24.02.2010, 17:11
You don't have to make ANY timers.
and FYI, a 'bayonet' is a knife that goes onto the end of a rifle for stabbing people.
pawn Код:
new CmdDelay[MAX_PLAYERS];
//OnPlayerCommandText
if (strcmp("/bayonet", cmdtext, true, 8) == 0)
{
if (CmdDelay[playerid]<GetTickCount())
{
SendClientMessage(playerid, 0xFFFFFFFF, "You have successfully reloaded your bayonet");
SendClientMessage(playerid, 0xAAAAAAAA, "(( You may only use the bayonet each every six seconds (takes 6sec to reload). ))");
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 33, 1);
CmdDelay[playerid] = GetTickCount()+6000; //6000 = 6 seconds
}
return 1;
}
and FYI, a 'bayonet' is a knife that goes onto the end of a rifle for stabbing people.