Quick question
#2

You can use sscanf.

I will use ZCMD for this:

pawn Код:
CMD:faction(playaerid, params[])
{
    new Option[32], ID; // ID will be used for Player ID, Option will be like "Invite" or "uninvite"
    if(sscanf(params, "s[32]u", Option, ID))//This is the sscanf statement, s[32] = String using size of 32, u is the id
    {
        SendClientMessage(playerid, -1, "Usage: /faction [Option] [ID]");
        SendClientMessage(playerid, -1, "Options: Invite, Uninvite");//If they don't type the full command these messages will send
    }
    else
    {
        if(strcmp(Option, "invite", true) == 0)//If they type invite for option
        {
            //Invite goes here
        }
        if(strcmp(Option, "uninvite", true) == 0)//if they type uninvite for the option
        {
        // Uninvite goes here
        SendClientMessage(ID, -1, "Sends message to the ID of the player, Using ID");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Quick question - by EliteApple - 30.01.2014, 01:27
Re: Quick question - by Shockey HD - 30.01.2014, 01:51
Re: Quick question - by EliteApple - 30.01.2014, 01:53
Re: Quick question - by Shockey HD - 30.01.2014, 01:55
Re: Quick question - by EliteApple - 30.01.2014, 01:58
Re: Quick question - by Shockey HD - 30.01.2014, 02:13
Re: Quick question - by EliteApple - 30.01.2014, 02:24

Forum Jump:


Users browsing this thread: 2 Guest(s)