Multiple Parameters
#1

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..
Reply
#2

bump

EDIT: found out, dont worry guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)