if (!strcmp(cmdtext,"/airstrike",true))
{
new player_delay = gettime() - Delay[playerid];
if (player_delay < command_delay)
{
new String[128];
format(String, sizeof(String), "You need to wait %d seconds!", command_delay - player_delay);
SendClientMessage(playerid,COLOR_RED,String);
}
if(GetPlayerScore(playerid) >=250)
{
GivePlayerMoney(playerid,-950);
SendClientMessage(playerid, COLOR_RED, "You payed $1000 money for the airstrike!");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
CreateExplosion(X, Y, Z, 6, 20.0);
CreateExplosion(X+10, Y, Z, 6, 20.0);
CreateExplosion(X+20, Y, Z, 11, 20.0);
CreateExplosion(X+40, Y, Z, 11, 20.0);
CreateExplosion(X, Y+10, Z, 6, 20.0);
CreateExplosion(X, Y+20, Z, 11, 20.0);
CreateExplosion(X, Y+40, Z, 11, 20.0);
return 1;
}
}
"[ code][ /code]"
Originally Posted by kaisersouse
at the very least, you need to "return 1;" after the "you haveto wait" message.
Add some debug code that displays the values of player_delay and command_delay. I suspect that you might want to switch your < to > or something. |