I tried but did not work, one player is randomly chosen and win the HE.
PHP Code:
#include <sourcemod>
#include <cstrike>
public OnPluginStart()
{
HookEvent("round_start", round_start);
}
public Action:round_start(Handle:event, const String:name[], bool:dontBroadcast)
{
GetRndClient();
}
GetRndClient()
{
decl iClients[MaxClients];
new numClients;
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && !IsClientSourceTV(i))
{
iClients[numClients++] = i;
}
}
if (numClients)
{
return iClients[GetURandomInt() % numClients];
}
else
{
return -1; // no clients? let's not divide by zero. :)
}
GivePlayerItem(numClients, "weapon_hegrenade");
}
Thanks.
__________________
My Plugins |
VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet
CZSBrasil TEAM