Command and Parameters
#3

//EDIT:
Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
not sure if you can do it with the player specifier like this: "U", but you should try.
as suggested by GoldenLion, use "U" instead of "I" i was too quick
----------------------------

Quote:
Originally Posted by HidroDF
Посмотреть сообщение
Anyone?
PHP код:
CMD:ochat(playeridparams[])
{
    new 
param[7],
        
id;
    if(
sscanf(params"s[7]I(-1)"param,id)) return SendClientMessage(playerid, -1"Use: /ochat [invite | close]");
    if(!
strcmp(param"invite"))
    {
        if(!
IsPlayerConnected(id)) return SendClientMessage(playerid, -1"Use: /ochat invite playerid");
        {
            
//do invite stuff here
        
}
    }
    else if(!
strcmp(param"close"))
    {
        
//do close stuff here
    
}
    else
        
SendClientMessage(playerid, -1"Options: invite + playerid or close");
    return 
1;

visit the sscanf thread to learn more about it
Reply


Messages In This Thread
Command and Parameters - by HidroDF - 02.01.2017, 17:07
Respuesta: Command and Parameters - by HidroDF - 02.01.2017, 18:06
Re: Respuesta: Command and Parameters - by CutX - 02.01.2017, 18:39
Re: Command and Parameters - by GoldenLion - 02.01.2017, 18:41
Re: Command and Parameters - by Spmn - 02.01.2017, 19:08
Re: Command and Parameters - by SickAttack - 02.01.2017, 20:23

Forum Jump:


Users browsing this thread: 1 Guest(s)