Quote:
Originally Posted by ♂ Antonio_
...roleplay of course.
|
aren't there more
COOL modes?
Anyways, check the MySQL topic, there's a link for a sample script.
ZCMD == as simple as this:
pawn Код:
// out of any function or whatever
CMD:commandname(playerid, params[])
{
return 1;
}
pawn Код:
CMD:whatdiditype(playerid, params[])
{
new
string[128];
format(string, sizeof(string), "You typed: %s", params);
SendClientMessage(playerid, COLOR, string);
return 1;
}
// that will send a message to you with what you typed after the command.
pawn Код:
CMD:isitright(playerid, params[])
{
new
id,
myname[24],
name[24];
if(sscanf(params, "rs[23]", id, name)) SendClientMessage(playerid, COLOR, "Type /isitright YOURID YOURNAME!"), SendClientMessage(playerid, COLOR, "E.G /isitright 135 Ronald");
else if(id != playerid) SendClientMessage(playerid, RED, "That isn't your ID!");
GetPlayerName(playerid, myname, 24);
else if(strcmp(name, myname, false) == 1) SendClientMessage(playerid, RED, "That isn't your name!");
else
{
new string[128];
format(string, 128, "Congratulations, you typed /isitright %s!", params);
SendClientMessage(playerid, COLOR, string);
}
return 1;
}