GameTextForAdmins +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: GameTextForAdmins +REP (
/showthread.php?tid=639660)
GameTextForAdmins +REP -
Filbert - 21.08.2017
Guys, I need a command that allow RCONs announce a text to all administrato and players won't see the message.
Код:
Admins => PlayerInfo[playerid][Level]
Sorry for my bad English
Re: GameTextForAdmins +REP -
ISmokezU - 21.08.2017
Loop through the players. Check for an Admin Status. Show the Text.
Re: GameTextForAdmins +REP -
Filbert - 21.08.2017
i dont know how to loop it, and what should i use? GameTextForPlayer or GameTextForAll
Re: GameTextForAdmins +REP -
ISmokezU - 21.08.2017
I don't know your command processor but if you're using ZCMD - IZCMD etc:
PHP код:
#include <a_samp>//
#include <sscanf2>
#include <izcmd>//
CMD:an(playerid, params[])
{
new string[56], text[56]; //
if(!IsPlayerAdmin(playerid)) return false;
if(sscanf(params, "s[56]", text)) return SendClientMessage(playerid, -1, "/an [Message]");
format(string, sizeof string, "%s", text);
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
if(PlayerInfo[i][Level] >= 1) GameTextShowForPlayer(i, text, 6000, 2);
}
return true;
}