View Single Post
Author Message
mousesports
Senior Member
Join Date: Oct 2010
Old 03-25-2020 , 14:47   REQ automatic revive VIP
Reply With Quote #1

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(1<= 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 1players32 ]

static 
msg191 ]
vformatmsg190input)

replace_allmsg190"!g""^4" //- verde
replace_allmsg190"!y""^1" //- galben
replace_allmsg190"!team""^3" //- echipa
replace_allmsg190"!n""^0" //- normal

if( id players] = id; else get_playersplayerscount"ch" )
{
for( new 
0counti++ )
{
if( 
is_user_connectedplayers] ) )
{
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ), _players] )
write_byteplayers] );
write_stringmsg );
message_end( );
}
}
}

__________________

Last edited by mousesports; 03-25-2020 at 15:00.
mousesports is offline