Simple problem
#2

pawn Код:
CMD:win(playerid, params[])
{
    if(!IsPlayerLuxAdmin(playerid))
    {
        return SendClientMessage(playerid, -1, "SERVER: Unknown Command.");
    }
    else
    {
        new id, name[MAX_PLAYER_NAME],str[128],string[32];
        if(sscanf(params, "us[32]", id, string)) return SendClientMessage(playerid, 0xCC0000AA, "USAGE: /win <id> <prize>");
        GetPlayerName(id, name, sizeof(name));
        format(str,sizeof(str), "~R~%s ~w~has won the event~n~and %s",name,string);
        GameTextForAll(str,6000,3);
    }
    return 1;
}
You forgot to add the string(s[32] too
pawn Код:
f(sscanf(params, "us[32]", id, string)) return SendClientMessage(playerid, 0xCC0000AA, "USAGE: /win <id>
Also 128 string is too big, so I decreased it to 32.
Reply


Messages In This Thread
Simple problem - by SnG.Scot_MisCuDI - 26.02.2012, 19:17
Re: Simple problem - by Lynn - 26.02.2012, 20:23
Re: Simple problem - by SnG.Scot_MisCuDI - 26.02.2012, 21:03

Forum Jump:


Users browsing this thread: 1 Guest(s)