02.01.2017, 18:39
//EDIT:
as suggested by GoldenLion, use "U" instead of "I" i was too quick
----------------------------
visit the sscanf thread to learn more about it
Quote:
not sure if you can do it with the player specifier like this: "U", but you should try.
|
----------------------------
PHP код:
CMD:ochat(playerid, params[])
{
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;
}