admin message - 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: admin message (
/showthread.php?tid=597171)
admin message -
AndreiWow - 27.12.2015
I want to make a command like
/amsg [text]
And it will bind for his account until he log out or change it.
if players type /admins it will be like this
Uncle - Admin Level 6 - *The message
Uncle - Admin Level 6 - Use /report if you see a hacker
I know how to make the command for the message, but how to make the message appear in /admins?
Re: admin message -
saffierr - 27.12.2015
Not quite sure, but I think of creating a variable
Re: admin message -
Tamy - 27.12.2015
Something like this?
Код:
new amsg[MAX_PLAYERS][64];
CMD:/amsg(playerid, par[])
{
new temp[64];
if(sscanf(par, "s", temp)) return 1;
format(amsg[playerid], 64, temp);
SendClientMessage(playerid, 0xFFFFFFFF, "You have successfully changed your Admin text.");
return 1;
}
CMD:admins(playerid, par[])
{
new str[64];
for(new i=0; i<MAX_PLAYERS; i++)
{
new name[32];
if(IsPlayerAdmin(i))
{
GetPlayerName(i, name, 32);
format(str, 64, " %s - Admin Level 6 - %s", name, amsg[i]);
SendClientMessage(playerid, 0xFFFFFFFF, str);
}
}
return 1;
}