18.01.2017, 11:58
Using a previous thread of mine I tried to integrate the same method into a different command, right now I've got this:
Using a little bit of debugging I get this:
(SendCMD simply shows the full cmd typed)
What am I doing wrong?
Код:
CMD:editservercar(playerid,params[]) { SendCMD(playerid, params); if(pData[playerid][pAdmin] >= 2) { if(!IsPlayerInAnyVehicle(playerid)) return SendErrorMessage(playerid, "You must be inside of a vehicle to do this."); new section[20]; if(sscanf(params, "s[20]", section)) { SendUsageMessage(playerid, "/editservercar [section]"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sections:{FFFFFF} Position | Faction | Job | Color1 | Color2 | Siren"); return 1; } else { if(strmatch(section, "position")) { ... code here that works that doesnt have a 2nd SSCANF in it } else if(strmatch(section, "faction")) { new factionid; if(sscanf(params, "s[20]i", section, factionid)) return SendUsageMessage(playerid, "/editservercar faction [factionid] (0-19)"); SendClientMessage(playerid, COLOR_LIMEGREEN, "debug 2nd sscanf"); }
(SendCMD simply shows the full cmd typed)
What am I doing wrong?