[HELP]Server message/MOLE - 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: [HELP]Server message/MOLE (
/showthread.php?tid=505964)
[HELP]Server message/MOLE -
JohnD123 - 11.04.2014
Hi, I want to make server message (it's something like MOLE if you play in Roleplay server).
So, I want to make message that can I send to all player
What I need to put in the underlined space?
Thanks for helping
Re: [HELP]Server message/MOLE -
Flake. - 11.04.2014
pawn Код:
CMD:say(playerid, params[])
{
if(PlayerStat[playerid][AdminLevel] >= 4) //If the players admin level is 4
{
new str[256]; //Defining the string that'll act as your message
if(sscanf(params, "s", str)) return SendClientMessage(playerid, COLOR_LIGHTRED, "Usage: /Say [Global Text]");
format(str, 256, "Server: %s", params);
SendClientMessageToAll(-1, str);
}
else SendClientMessage(playerid, "You're not a high enough.. blah blah");
return 1;
}
Haven't tested it but it should work..
Re: [HELP]Server message/MOLE -
Mriss - 11.04.2014
Quote:
Originally Posted by (*|Flake|*)
pawn Код:
CMD:say(playerid, params[]) { if(PlayerStat[playerid][AdminLevel] >= 4) //If the players admin level is 4 { new str[256]; //Defining the string that'll act as your message if(sscanf(params, "s", str)) return SendClientMessage(playerid, COLOR_LIGHTRED, "Usage: /Say [Global Text]"); format(str, 256, "Server: %s", params); SendClientMessageToAll(-1, str); } else SendClientMessage(playerid, "You're not a high enough.. blah blah"); return 1; }
Haven't tested it but it should work..
|
Your SendClientMessage is wrong..
replace with:
SendClientMessage(playerid, COLOR_LIGHTRED, "You're not a high enough.. blah blah");
Re: [HELP]Server message/MOLE -
Flake. - 11.04.2014
Quote:
Originally Posted by Mriss
Your SendClientMessage is wrong..
replace with:
SendClientMessage(playerid, COLOR_LIGHTRED, "You're not a high enough.. blah blah");
|
Yeah my bad, was editing it from a macro i was using and forgot to include the color
Re: [HELP]Server message/MOLE -
Equuuuin0X - 11.04.2014
just add the second blank with ''params'' like Flake have said.
and remove the first blank.