Out of ammo
#1

Could someone write me a code,that detects when the player shoots his last ammo?
Please make it to work with lagging players.(laggings players couldn't avoid it)
Thanks
Reply
#2

Put it in OnPlayerUpdate

PHP код:
if(GetPlayerAmmo(playerid) == 0)
{
new 
waffe[MAX_PLAYERS];
waffe[playerid] = GetPlayerWeapon(playerid);
new 
string[180];
new 
name[MAX_PLAYER_NAME];
format(string,sizeof(string),"%s's Weapon: %s has no Ammo",GetPlayerName(playerid,name,sizeof(name)),waffe);
for(new 
i=0i<MAX_PLAYERSi++)
{
if(
IsPlayerAdmin(i))
{
SendClientMessage(i,-1,string);
}
}

This send the Weapon and the Player to RCOn Admins
Reply
#3

Will this work if the player is lagging?
Reply
#4

Yes i think (-:
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)