07.01.2015, 14:37
Hello there, I have some issues with this...
if(strcmp(tmp, "hangup", true) == 0)
{
if(!IsPlayerConnected(id)) return 1;
if(PlayerInfo[playerid][pMobStats] == 0) return SCM(playerid, 0xFF8787FF, "ERROR: Your phone turned off or you didn't have it.");
if(TelefonRazgovor[playerid] != -1)
{
TelefonZvoni[playerid] = false, TelefonZvoni[TelefonRazgovor[playerid]] = false,
SCM(TelefonRazgovor[playerid],COLOR_YELLOW,"Call ended.");
SetPlayerSpecialAction(TelefonRazgovor[playerid], SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(TelefonRazgovor[playerid], TELEFON_SLOT), SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(playerid, TELEFON_SLOT); //KillTimer(MobilniCenaRazgovora[playerid]), KillTimer(MobilniCenaRazgovora[TelefonRazgovor[playerid]]);
TelefonRazgovor[TelefonRazgovor[playerid]] = -1, TelefonRazgovor[playerid] = -1;
SCM(playerid,COLOR_YELLOW,"Call ended.");
KillTimer(Zvonjava[playerid]), KillTimer(Zvonjava[TelefonRazgovor[playerid]]);
KillTimer(Cijena[playerid]), KillTimer(Cijena[TelefonRazgovor[playerid]]);
return 1;
}
else return SCM(playerid,0xFF8787FF,"ERROR: Your phone is not ringing, try again later if it rings.");
}
So, command process but says Unknown command, but when I'm not on call and "Your phone is not ringing, try again later if it rings" it works great, process and doesn't says "Unknown command"
if(strcmp(tmp, "hangup", true) == 0)
{
if(!IsPlayerConnected(id)) return 1;
if(PlayerInfo[playerid][pMobStats] == 0) return SCM(playerid, 0xFF8787FF, "ERROR: Your phone turned off or you didn't have it.");
if(TelefonRazgovor[playerid] != -1)
{
TelefonZvoni[playerid] = false, TelefonZvoni[TelefonRazgovor[playerid]] = false,
SCM(TelefonRazgovor[playerid],COLOR_YELLOW,"Call ended.");
SetPlayerSpecialAction(TelefonRazgovor[playerid], SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(TelefonRazgovor[playerid], TELEFON_SLOT), SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(playerid, TELEFON_SLOT); //KillTimer(MobilniCenaRazgovora[playerid]), KillTimer(MobilniCenaRazgovora[TelefonRazgovor[playerid]]);
TelefonRazgovor[TelefonRazgovor[playerid]] = -1, TelefonRazgovor[playerid] = -1;
SCM(playerid,COLOR_YELLOW,"Call ended.");
KillTimer(Zvonjava[playerid]), KillTimer(Zvonjava[TelefonRazgovor[playerid]]);
KillTimer(Cijena[playerid]), KillTimer(Cijena[TelefonRazgovor[playerid]]);
return 1;
}
else return SCM(playerid,0xFF8787FF,"ERROR: Your phone is not ringing, try again later if it rings.");
}
So, command process but says Unknown command, but when I'm not on call and "Your phone is not ringing, try again later if it rings" it works great, process and doesn't says "Unknown command"