>>Help<<
#3

Quote:
Originally Posted by ► James_Alex
easy to do
create a bool
then when the player types the cmd change the bool to true
then when he typr the cmd check if the bol is false
try this
pawn Код:
// add this in the top of the scrit
new bool:tCmd[MAX_PLAYERS];
// then this is your cmd
if(!strcmp(cmd, "/dm15", true))
{
if(tCmd[playerid] == false)
{  
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
GivePlayerWeapon(playerid, 9, 1);
SetPlayerHealth(playerid, 100.0);
SetPlayerPos(playerid, -924.0569, 2675.6586, 42.3703);
GetPlayerName(playerid, var0, 25);
format(var1, 256, "%s DM15'e (Testere) gecis yapti(/dm15).", var0);
TextDrawSetString(Text:Bilgi,var1);
TextDrawShowForAll(Text:Bilgi);
SetTimerEx("Silici",12000,0, "i", playerid); // here try "SetTimerEx" it's better and it juste hide the text for player
tCmd[playerid] = true;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot type a dm command again before 12 seconds !");
}
return 1;
}

// this is what you have to put in the timer
public Silici(playerid)
{
// bla bla bla(your script functions
tCmd[playerid] = false;
return 1;
Thank you..
Reply


Messages In This Thread
>>Help<< - by RyDeR` - 24.08.2009, 09:58
Re: >>Help<< - by James_Alex - 24.08.2009, 10:28
Re: >>Help<< - by RyDeR` - 24.08.2009, 13:42

Forum Jump:


Users browsing this thread: 1 Guest(s)