PDA

View Full Version : Automatic screen shot !


madrippeur
11-23-2006, 04:06 PM
hello all :)
so, i was looking for a plugin (for dod) wich can take a screen shot when i'm killing some one ... I found it !
but the probleme is taht the plugin is taking the screen shot to fast and so on the screen shot, we don't see who we kill and the phrase :
madrippeur kill truc

I'm giving u the source of this plugin. i just need someone to do the plugin take the screenshot a bit to late (for exemple 15ms after).
Maybe this plugin well be fine for a lot of server :)

thx for you'r help :)

diamond-optic
11-23-2006, 07:24 PM
I'm giving u the source of this plugin

you never gave

:-(

lol

madrippeur
11-24-2006, 05:40 AM
oups really sorry :(

#include <amxmodx>

public killevent() {
new kname[32];
new kinfo[8];
new kid = read_data (1);
new vid = read_data (2);
new msg[128];

get_user_info (kid, "killcam", kinfo, sizeof(kinfo));

if (equal (kinfo, "on", 0)) {
if ((kid != vid) && (kid != 0)) {
set_hudmessage(255, 200, 000, 0.05, 0.7, 2, 0.02, 12.0, 0.0, 0.2, 4);

format (msg, sizeof(msg), "Oua ! beau screenshot !");
show_hudmessage (kid, msg);
client_cmd (kid, "snapshot");

get_user_name (kid, kname, 31);
format (msg, sizeof(msg), "%s a pris une photo de ta belle mort ", kname);
show_hudmessage (vid, msg);
}
}

return PLUGIN_HANDLED
}

public plugin_init(){
register_plugin("Take13 KillCam", "0.1a", "GIR");
register_event("DeathMsg", "killevent", "a");
return PLUGIN_CONTINUE
}

madrippeur
11-27-2006, 05:51 PM
no idea to put a delay somewhere please?

diamond-optic
11-27-2006, 06:09 PM
this is a pretty shitty way to add delay.. but it should work

CVAR to control delay time: killcam_delay "0.5" (1.0=1second)

#include <amxmodx>

new p_delay

public plugin_init()
{
register_plugin("Take13 KillCam", "0.1a", "GIR")
register_event("DeathMsg", "killevent", "a")
p_delay = register_cvar("killcam_delay","0.5")
}

public killevent()
{
new kinfo[8]
new kid = read_data (1)
new vid = read_data (2)

get_user_info(kid, "killcam", kinfo, sizeof(kinfo))

if(equal(kinfo, "on", 0))
{
if((kid != vid) && (kid != 0))
{
new kname[33]
get_user_name(kid,kname,32)

set_task(get_pcvar_float(p_delay),"funcKiller",kid)
set_task(get_pcvar_float(p_delay),"funcVictim",vid,kname,32)
}
}
}

public funcKiller(id)
{
if(is_user_connected(id) && !is_user_bot(id))
{
new msg[128]

set_hudmessage(255, 200, 000, 0.05, 0.7, 2, 0.02, 12.0, 0.0, 0.2, 4)

format(msg,sizeof(msg),"Oua ! beau screenshot !")
show_hudmessage(id,msg)
client_cmd(id,"snapshot")
}
}

public funcVictim(id,name[])
{
if(is_user_connected(id) && !is_user_bot(id))
{
new msg[128]

format(msg,sizeof(msg),"&#37;s a pris une photo de ta belle mort",name)
show_hudmessage(id,msg)
}
}

madrippeur
12-14-2006, 08:44 AM
thaks a lot i'm testing this :)