Good evening,
I need a plugin, which will give automatically, but with a 0.5% chance to revive the vip when they are killed. With this plugin I have attached, those with vip can write / revive. Please change it to automatic revive with random spawn, with a 0.5% chance if you can. Thank you !
PHP Code:
#include <amxmodx>
#include <hamsandwich>
static const
PLUGIN[] = "",
VERSION[] = "1.0",
AUTHOR[] = "scosmyn";
new count[33] = 0
public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR);
register_clcmd("say /revive","cmdRevive")
register_logevent("round_start",2,"1=Round_Start");
}
public round_start( ) {
static i
for(i = 1; i <= get_maxplayers(); i++)
count = 0
}
public cmdRevive(id) {
if(count[id] == 3)
{
color(id,"!team[V.I.P REVIVE] !yAi folosit deja de 3 ori !grevive !yrunda viitoare poti accesa dinou!")
return 1
}
if(is_user_alive(id))
return 1
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
color(id,"!team[V.I.P REVIVE] !yNu ai acces la /revive , doar !gV.I.P-ul !yare acces!")
return 1
}
count[id]++
ExecuteHam(Ham_CS_RoundRespawn,id)
return 0
}
stock color( const id, const input[ ], any:... )
{
new count = 1, players[ 32 ]
static msg[ 191 ]
vformat( msg, 190, input, 3 )
replace_all( msg, 190, "!g", "^4" ) //- verde
replace_all( msg, 190, "!y", "^1" ) //- galben
replace_all( msg, 190, "!team", "^3" ) //- echipa
replace_all( msg, 190, "!n", "^0" ) //- normal
if( id ) players[ 0 ] = id; else get_players( players, count, "ch" )
{
for( new i = 0; i < count; i++ )
{
if( is_user_connected( players[ i ] ) )
{
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
write_byte( players[ i ] );
write_string( msg );
message_end( );
}
}
}
}
__________________