sscanf & zcmd "multi-command"
#2

Replace the sscanf with isnull.

Код:
CMD:editveh(playerid, params[])
{
    new vehid;
    if(isnull(params)) {SendClientMessage(playerid, -1, "/editveh (option) (vehid)"); SendClientMessage(playerid, -1, "{989898}[OPTIONS]: faction | locked"); return 1;}
    if(!strcmp(params, "faction", true, 7))
    {
        if(sscanf(params, "s[32]i",params,vehid)) return SendClientMessage(playerid, -1, "/editvehicle faction (vehid)");
        SendClientMessage(playerid, -1, "Vehicle successfully updated.");
    }
    return 1;
}
If you haven't defined isnull, put this at the top of your script:
Код:
#if !defined isnull
    #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
Reply


Messages In This Thread
sscanf & zcmd "multi-command" - by nerovani - 04.03.2016, 21:14
Re: sscanf & zcmd "multi-command" - by CalvinC - 04.03.2016, 21:33
Re: sscanf & zcmd "multi-command" - by saffierr - 04.03.2016, 21:33
Re: sscanf & zcmd "multi-command" - by Jefff - 04.03.2016, 21:34
Re: sscanf & zcmd "multi-command" - by nerovani - 05.03.2016, 08:48
Re: sscanf & zcmd "multi-command" - by ZToPMaN - 05.03.2016, 09:54
Re: sscanf & zcmd "multi-command" - by nerovani - 05.03.2016, 11:25
Re: sscanf & zcmd "multi-command" - by Threshold - 05.03.2016, 12:23
Re: sscanf & zcmd "multi-command" - by nerovani - 05.03.2016, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)