SA-MP Forums Archive
Multiple Parameters - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Multiple Parameters (/showthread.php?tid=262509)



Multiple Parameters - Lorenc_ - 18.06.2011

Hi! I was wondering since i forgot how could i make another parameter to a code without using sscanf?

like:

pawn Код:
CMD:a(playerid, params[])
{
    if(isnull(params)) return 0;
    else if(!strcmp(params, "ann")) // /a ann [text]
    {
        GameTextForPlayer(playerid, params[7], 3000, 4);
    }
    else if(!strcmp(params, "sco"))// /a sco [playerid] [score]
    {
        SetPlayerScore(strval(params[7]), strval(params[ ?? Whats here ?? ]));
    }
    return 1;
}
I have a bad habbit of remembering things and would want a recap of this.. Clearly: /a ann wont work, not sure why..


Re: Multiple Parameters - Lorenc_ - 19.06.2011

bump

EDIT: found out, dont worry guys!