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


Messages In This Thread
Multiple Parameters - by Lorenc_ - 18.06.2011, 11:17
Re: Multiple Parameters - by Lorenc_ - 19.06.2011, 00:41

Forum Jump:


Users browsing this thread: 2 Guest(s)