Can't write the same command for 1 min ?
#1

Is it possible to make this command -
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid, 100);
        GivePlayerMoney(playerid, -50);
        return 1;
    }
to be written only one time for on minute ?
Reply
#2

Here, try this:

Click Here
Reply
#3

WOW , that's a lot of writing ,anyways tnx
Reply
#4

haha It's alright, I'm a little bored you see so... I have to help to keep myself occupied, feel free to ask for help if you need it again.
Reply
#5

Or a more simple one:
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) == 0)    
{
if(GetPVarInt(playerid,"Wiiee") == 1) return SendClientMessage(playerid, COLOR, "You cant use this cmd right now.");
SetPlayerHealth(playerid, 100);        
GivePlayerMoney(playerid, -50);
SetPVarInt(playerid, "Wiiee", 1);
SetTimerEx("CantTalk", 60000, 0, "i", playerid);
return 1;    
}

//At the bottom of your script:
forward CantTalk(playerid);
public CantTalk(playerid)
{
SetPVarInt(playerid, "Wiiee", 0);
return 1;
}
Reply
#6

Either way, they both work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)