
Untitled
By: a guest on
Aug 3rd, 2012 | syntax:
None | size: 1.49 KB | hits: 11 | expires: Never
#include < amxmisc >
#include < hamsandwich >
#include < fakemeta >
new bool:Simon[ 33 ]
new bool:eAllowed
public plugin_init()
{
register_plugin( "Simon", "1.0", "ASDFA" )
register_clcmd( "say /simon", "ClCmd_Simon" )
register_logevent( "eRound_Start", 2, "1=Round_Start" )
RegisterHam( Ham_Killed, "player", "eDeath" )
}
public ClCmd_Simon( id )
{
if( get_pdata_int( id, 114 ) == 2 )
{
if( is_user_alive( id ) )
{
if( eAllowed )
{
Simon[ id ] = true
eAllowed = false
client_print( id, print_chat, "Jestes prowadzacym straznikiem." )
}
else client_print( id, print_chat, "Ktos inny juz wybral prowadzenie." )
}
else client_print( id, print_chat, "Musisz zyc aby wziac prowadzenie." )
}
else client_print( id, print_chat, "Tylko klawisze moga wziac prowadzenie." )
}
public eDeath( id )
{
if( Simon[ id ] )
{
Simon[ id ] = !Simon[ id ]
}
}
public eRound_Start()
{
new iPlayers[ 32 ], iNum
get_players( iPlayers, iNum )
for( new i; i < iNum; i++ )
{
Simon[ iPlayers[ i ] ] = false
}
eAllowed = true
}
public plugin_natives()
{
register_library( "Simon" )
register_native( "is_user_simon", "_simon" )
}
public _simon( plugin, params )
{
return Simon[ get_param( 1 ) ]
}