06.08.2013, 11:28
How to make command, with one word argument?
for example:
if /test test1 do something
if /test test2 do something
for example:
if /test test1 do something
if /test test2 do something
CMD:test(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /test <test1/test2>");
if(!strcmp(params, "test1", true))
{
// Do something;
}
else if(!strcmp(params, "test2", true))
{
// Do something;
}
else SendClientMessage(playerid, -1, "Usage: /test <test1/test2>");
return 1;
}