20.09.2012, 19:57
First you must declare GetPlayerAmmo as a word/or something else!
Example:
Then I suggest you to make a timer instead of using OnPlayerUpdate, like this:
Then Create the Callback for TestPlayerAmmo:
Example:
Quote:
new currentammo = GetPlayerAmmo( playerid ); |
Quote:
SetTimer( "TestPlayerAmmo", 1500, true ); |
Quote:
TestPlayerAmmo( playerid ) { new currentammo = GetPlayerAmmo( playerid ); if( currentammo/GetPlayerAmmo( playerid ) < 1 )//as this is an example. { print( "Player One have only 1 Ammo left" ); } } |