Announcement CMD (REP++) - 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)
+--- Thread: Announcement CMD (REP++) (
/showthread.php?tid=335966)
Announcement CMD (REP++) -
iOmar - 20.04.2012
=> Hey Guys!
====> I want to make announcement cmd. Using ZCMD "CMD:announcement"..
And this will send to all players and only admin with equal or greater than level 4 can use it.
It will Appear Like:
Blue Color |___________Server Announcement___________|
"Message"
Re: Announcement CMD (REP++) -
ViniBorn - 20.04.2012
You already tried make this?
Re: Announcement CMD (REP++) -
FalconX - 20.04.2012
Quote:
Originally Posted by iOmar
=> Hey Guys!
====> I want to make announcement cmd. Using ZCMD "CMD:announcement"..
And this will send to all players and only admin with equal or greater than level 4 can use it.
It will Appear Like:
Blue Color |___________Server Announcement___________|
"Message"
|
pawn Код:
COMMAND:announce(playerid, params[])
{
new Fstring[164], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(sscanf(params, "s[128]", Fstring))
{
SendClientMessage(playerid, -1, "ERROR: Usage /announce [message]");
return 1;
}
else
{
SendClientMessageToAll(-1, "|___________Server Announcement___________|");
format(Fstring, sizeof(Fstring), "(ANNOUNCEMENT) %s: %s ", name, Fstring);
SendClientMessageToAll(-1, Fstring);
}
return 1;
}
-FalconX
Re: Announcement CMD (REP++) -
iOmar - 20.04.2012
Thnx Rep Added.
Re: Announcement CMD (REP++) -
Twisted_Insane - 20.04.2012
@Falcon
Totally irrelevant and too long script; this would make it:
pawn Код:
COMMAND:ann(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4) //change this to your own admin-enum
{
new Announce[50];
if(!sscanf(params, "s[50]",Announce))
{
GameTextForAll(Announce,5000,3);
}
else SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /ann <text>");
}
else SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 1 to use this command!");
return 1;
}
@iOmar
Take mine, the one from Falco would allow it for any player, this one is limited to level 4+ admins....
Re: Announcement CMD (REP++) -
ViniBorn - 20.04.2012
Quote:
Originally Posted by FalconX
pawn Код:
COMMAND:announce(playerid, params[]) { new Fstring[164] // // SendClientMessageToAll(-1, Fstring);
-FalconX
|
Text I/O 128 cells (512 bytes)
Re: Announcement CMD (REP++) -
FalconX - 26.04.2012
Quote:
Originally Posted by Twisted_Insane
@Falcon
Totally irrelevant and too long script; this would make it:
pawn Код:
COMMAND:ann(playerid,params[]) { if(PlayerInfo[playerid][pAdmin] >= 4) //change this to your own admin-enum {
new Announce[50]; if(!sscanf(params, "s[50]",Announce)) { GameTextForAll(Announce,5000,3); } else SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /ann <text>"); } else SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 1 to use this command!"); return 1; }
@iOmar
Take mine, the one from Falco would allow it for any player, this one is limited to level 4+ admins....
|
Haha made me laughed out loudly xDD keep dreaming insane xd
(Sorry for a big bump nvm it's just 6 days old

)
-FalconX