Advirtise - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Advirtise (
/showthread.php?tid=277119)
Advirtise -
Compton - 16.08.2011
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.
Re: Advirtise -
Soumi - 16.08.2011
pawn Код:
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;
}
here you go.
Re: Advirtise -
Kush - 16.08.2011
PHP код:
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;
}
Heres a simple one done in YCMD.
Re: Advirtise -
=WoR=Varth - 16.08.2011
You don't need to use sscanf.