[Ajuda] comando bugado - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] comando bugado (
/showthread.php?tid=584415)
comando bugado -
CZ - 04.08.2015
alguem me ajuda com esse comando pf
ele era em zcmd passei pra strcmp e nгo pega agora
pawn Код:
CMD:startrace(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "<!> You are not an administrator!");
if(AutomaticRace == true) return SendClientMessage(playerid, RED, "<!> Not possible. Automatic race is enabled!");
if(BuildRace != 0) return SendClientMessage(playerid, RED, "<!> There's someone building a race!");
if(RaceBusy == 0x01 || RaceStarted == 1) return SendClientMessage(playerid, RED, "<!> There's a race currently. Wait first till race ends!");
if(isnull(params)) return SendClientMessage(playerid, RED, "<!> /startrace [racename]");
LoadRace(playerid, params);
return 1;
}
Agora em Strcmp
pawn Код:
if(strcmp(cmd, "/iniciarcorrida", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1) return SendClientMessage(playerid,0x66CCFFAA,StringTable[8]);
if(BuildRace != 0) return SendClientMessage(playerid, RED, "Nгo й possнvel. Corrida automбtica estб ativada!");
if(RaceBusy == 0x01 || RaceStarted == 1) return SendClientMessage(playerid, RED, "Hб alguйm a construзгo de uma corrida!");
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "Use /Iniciarcorrida [Nome-Da-Corrida]");
LoadRace(playerid, cmd);
return 1;
}