22.07.2012, 05:48
An example using ZCMD.
pawn Код:
CMD:secretthing(playerid, params[])
{
if(isnull(params))
{
SendClientMessage(playerid, -1, "USAGE: /secretthing [password]");
return 1;
}
if(!strcmp(params, "secretpassword"))
{
// if they typed "secret password"
// this section will be ran.
SendClientMessage(playerid, -1, "Right password!");
return 1;
}
else
{
// the password was wrong
SendClientMessage(playerid, -1, "Wrong password!");
}
return 1;
}