06.10.2016, 07:19
Hey there. I made a /robstore command.
It works successfully but the problem is that when player types /robstore command the info text is sent + the
is executed at the same time which gives server:unknown command on the screen. So can i somehow make this
execute at that time when player again types that command.
Код:
CMD:robstore(playerid, params[])
{
if(!Store1(playerid) || !Store2(playerid) || !Store3(playerid))
{
SCM(playerid, COLOR_RED, "[ERROR]: You need to be in a store to perform this action!");
}
if(gTeam[playerid] == LSPD)
{
SCM(playerid, COLOR_RED, "[ERROR]: COPS can't perform this action!");
}
SendClientMessage(playerid, COLOR_YELLOW, "[INFORMATION]: Robbery has been started, please wait 45 seconds! Note: You can't perfrom another rob within 20 seconds.");
SetTimerEx("Robbing2", 45000, false, "i", playerid);
wantedlevel = GetPlayerWantedLevel(playerid);
SetPlayerWantedLevel(playerid, 1);
Robbing[playerid] = 1;
if(RobCooldown[playerid] > 0) return 0;
if(Robbing[playerid] > 0) return 0;
return 1;
}
Код:
if(RobCooldown[playerid] > 0) return 0; if(Robbing[playerid] > 0) return 0;
Код:
if(RobCooldown[playerid] > 0) return 0; if(Robbing[playerid] > 0) return 0;

