20.09.2012, 19:48
Okay, I have a question. Can I do it like when player has left 1 bullet,he couldn't use it anymore,I mean it can't reach lower than 1 bullet.
public OnPlayerUpdate(playerid)
{
if(GetPlayerAmmo(playerid) == 1)
{
/* What you want to do here */
}
return 1;
}
new currentammo = GetPlayerAmmo( playerid ); |
SetTimer( "TestPlayerAmmo", 1500, true ); |
TestPlayerAmmo( playerid ) { new currentammo = GetPlayerAmmo( playerid ); if( currentammo/GetPlayerAmmo( playerid ) < 1 )//as this is an example. { print( "Player One have only 1 Ammo left" ); } } |
// basically you're doing that.
1/1 = 1
2/2 = 1
3/3 = 1