if(!strcmp("/warusa", cmdtext, true))
{
SetPlayerPos(playerid,2525,-1893,14);
SetPlayerFacingAngle(playerid,180);
}
if(!strcmp("/warusa", cmdtext, true))
{
if(GetPVarInt(playerid,"DisabledCMD") == 1) return SendClientMessage(playerid,COLOR_RED,"You can't use this command, you just used it!");
SetPlayerPos(playerid,2525,-1893,14);
SetPlayerFacingAngle(playerid,180);
SetPVarInt(playerid,"DisabledCMD",1);
SetTimer("DisabledCMD,your_time_here,0); //change the your_time_here to your time!
}
forward DisabledCMD(playerid);
public DisabledCMD(playerid)
{
SetPVarInt(playerid,"DisabledCMD",0);
SendClientMessage(playerid,COLOR_GREEN,"You can use the command again!");
}
native IsCommandLocked(something);
forward Command();
public Command()
{
IsCommandLocked(1);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/commandlock", cmdtext, true))
{
SetTimer("Command", 10000, false);
}
if(!strcmp("/warusa", cmdtext, true))
{
if (IsCommandLocked(0))
{
SetPlayerPos(playerid,2525,-1893,14);
SetPlayerFacingAngle(playerid,180);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"LALALALA");
}
}
return 0;
}
your a great,.,.,
|
thnx Jari_Johnson* it works
your a great,.,.,thnx for helping all!! im so happy ![]() |