[HELP]Commands sscanf & zcmd
#3

pawn Код:
CMD:world(playerid, params[])
{
    new id;
    if(sscanf(params, "i", id)) return SendClientMessage(playerid, -1, "Usage: /world [id]");
    if(id > 99 || id < 0) return SendClientMessage(playerid, -1, "Limit: 0-99);
    Worlds[playerid] = id;
    return 1;
}
Not quite sure what you wanted. Didn't know whether to make Worlds = id, or make it one. I just made it so that it sets the players Worlds variable to the id the put in.

EDIT: Looks like I was too late.
Reply


Messages In This Thread
[HELP]Commands sscanf & zcmd - by TheBluec0de - 08.06.2012, 17:37
Re: [HELP]Commands sscanf & zcmd - by Niko_boy - 08.06.2012, 17:44
Re: [HELP]Commands sscanf & zcmd - by Kindred - 08.06.2012, 17:45
Re: [HELP]Commands sscanf & zcmd - by TheBluec0de - 08.06.2012, 17:57
Re: [HELP]Commands sscanf & zcmd - by TheBluec0de - 08.06.2012, 18:34
Re: [HELP]Commands sscanf & zcmd - by Jefff - 08.06.2012, 18:40
Re: [HELP]Commands sscanf & zcmd - by TheBluec0de - 08.06.2012, 22:31
Re: [HELP]Commands sscanf & zcmd - by Dubya - 08.06.2012, 23:44
Re: [HELP]Commands sscanf & zcmd - by .FuneraL. - 08.06.2012, 23:50
Re: [HELP]Commands sscanf & zcmd - by TheBluec0de - 09.06.2012, 00:11

Forum Jump:


Users browsing this thread: 1 Guest(s)