Affing frags?
Started by TozABG
07/06/2011 23:10
Page 1 of 1
TozABG07/06/2011 23:10
I need some plugin who add you a frag on every map, or something like that, because i want to have statistic on gt.com to see who play on my server.
JocA 08/06/2011 11:54(edited 08/06/2011 20:22)
eo probaj ovo tozo:
#include
#include
#include
#include
#define PLUGIN "1 frag on connect"
#define VERSION "1.0"
#define AUTHOR "Joca"
new bool:prvi_spawn[ 33 ]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1 )
}
public client_putinserver( id )
prvi_spawn[ id ] = true
public player_spawn( id )
{
if( is_user_alive( id ) && prvi_spawn[ id ] )
{
cs_set_user_frags( id, 1337 )
prvi_spawn[ id ] = false
}
}when player connect (=on his 1. spawn) he has 1337 frags.
doktor08/06/2011 23:28(edited 08/06/2011 23:29)
Joca code won't detect retries (and can't compile).
#include
#include
#define VERSION "0.0.1"
#define PLUGIN "1 Frag per map"
new Trie:g_tAlreadyGotFrag
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "ConnorMcLeod")
g_tAlreadyGotFrag = TrieCreate()
}
public client_putinserver( id )
{
static szAuthid[32]
get_user_authid(id, szAuthid, charsmax(szAuthid))
if( TrieKeyExists(g_tAlreadyGotFrag, szAuthid) )
{
TrieSetCell(g_tAlreadyGotFrag, szAuthid, 1)
set_pev(id, pev_frags, 1)
}
}Page 1 of 1
Please log in to post replies.