18.02.2013, 03:07
The params[] in zcmd isn't there for show, it's the value that represents the string a player typed in.
ofc, you can optimize it with isnull(), but I just wanted to get the point across
pawn Код:
CMD:door(playerid, params[])
{
if(!strcmp(params, "open", true)) {
// code if they typed open
return 1;
}
else if (!strcmp(params, "close", true)) {
// code if they typed close
return 1;
}
else {
SendClientMessage(playerid, -1, "USAGE: /door [open or close]");
}
return 1;
}