23.03.2015, 22:50
Here's an example:
And I suggest that you leave the issue on the main post for future issues which are similar to yours.
pawn Код:
CMD:gedit(playerid, params[])
{
new option[128], gateid;
if(sscanf(params, "s[128]i", option, gateid))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gedit [option] [gateid]");
SendClientMessage(playerid, COLOR_GREY, "OPTIONS: object | close | open | speed | password");
return 1;
}
if(strcmp(option, "object", true) == 0)
{
// Code...
}
else if(strcmp(option, "close", true) == 0)
{
// Code...
}
else if(strcmp(option, "open", true) == 0)
{
// Code...
}
else if(strcmp(option, "speed", true) == 0)
{
// Code...
}
else if(strcmp(option, "password", true) == 0)
{
// Code...
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gedit [option] [gateid]");
SendClientMessage(playerid, COLOR_GREY, "OPTIONS: object | close | open | speed | password");
}
return 1;
}