16.08.2011, 15:21
Hello people, Im wondering how to make a /adv command I never made such things before and I Have no idea in how to make it, please help.
-Thank you.
-Thank you.
COMMAND:adv(playerid, params[])
{
new message[128], string[128], name[MAX_PLAYER_NAME];
if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, WHITE, "USAGE: /adv [message]);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Advertisement by %s: %s.", name, message);
SendClientMessageToAll(GREEN, string);
return 1;
}
YCMD:adv(playerid, params[], help)
{
if(help) { SendClientMessage(playerid, -1, "This command is used to place advertisements."); }
else
{
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name))
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: (/adv)ertise [message]");
format(string, sizeof(string), "(( %s - Advertisment by: %s))", params, name);
SendClientMessageToAll(-1, string);
}
return 1;
}
if(isnull(params))