[HELP] Give Timer For Using Command
#1

[HELP]
How to create Timer On Using command

This my code

//Pick Ammo
CMDickammo(playerid,params[])
{
for(new i= 0; i < sizeof(pickup_Box); i++)
{
new Float,Float: y,Float: z;
new weapons[13][2];
GetPlayerWeaponData( playerid, i, weapons[i][0], weapons[i][1] );
SetPlayerAmmo( playerid, i, weapons[i][1] + ( 5 + random( 500 ) ) );
GetObjectPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, x, y ,z, 10.0)) { SendClientMessage( playerid, -1, "Anda dekat dengan objek Pick_Box!" ); }
}
return 1;
}

Please Help Me
Thanks

No Ones Help o.O ?
Reply
#2

Could you tell me more about what you want?
A timer yes, but where and for what?
Reply
#3

There's an easier method but I really not sure if it works or not so I'll use the old method.

Set a variable when the command is processed to TRUE. (PS: Make sure the variable is for MAX_PLAYERS)
After that set the timer you'd like for the player to proccess the command again.
When the timer ends set the variable for the player to FALSE.

If you would like an example feel free to tell me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)