25.02.2014, 23:19
coded in ZCMD.
That should work
pawn Код:
CMD:minigunevent(playerid)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You are not admin"); //requires RCON, can be changed if you have a custom admin system
for(new i; i<MAX_PLAYERIS; i++)
{
if(IsPlayerConnected(i))
{
GivePlayerWeapon(playerid, 38, 999999);
}
}
SetTimer("RemoveMinigun", 60000, false);
SendClientMessageToAll(-1, "The minigun event has been activated by an admin!");
return 1;
}
forward RemoveMinigun();
public RemoveMiniGun()
{
for(new i; i>MAX_PLAYERS, i++)
{
if(GetPlayerWeapon(i) == 38)
{
ResetPlayerWeapons(i);
}
}
return 1;
}