14.02.2017, 16:16
Continue the sequence i just gave but using what you need! It's simple, the way below:
EDIT ;
Sorry, i didn't read what you wanted quite carefully. Below is maybe what you need. Also, the one with OnPlayerText seems to be more stylish but it's your choice!
BELOW CODE IS UNTESTED!
PHP код:
public OnPlayerText(playerid, text[])
{
if (!strcmp(text, "show burg", true))
{
// Code here
return 0; // Not allowing him to display the message on the open chat
}
}
Sorry, i didn't read what you wanted quite carefully. Below is maybe what you need. Also, the one with OnPlayerText seems to be more stylish but it's your choice!
BELOW CODE IS UNTESTED!
PHP код:
CMD:test(playerid, params[])
{
new str[16];
if(sscanf(params, "s[16]", str)) return SendClientMessage(playerid, -1, "Usage: /test [params]");
if (!strcmp(str, "burg", true))
{
// Code here
}
return 1;
}

