[HELP] Admin chat - 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: [HELP] Admin chat (
/showthread.php?tid=123489)
[HELP] Admin chat -
Lorenc_ - 26.01.2010
Hello I've been searching the forum on how to make a admin chat like /a [text] but i couldn't find anything in dcmd. It was all strcmp and which in that case i am not using strcmp. I copied the one with the prefix one of xadmin and i tryed the v admin one but they got me lots of errors...
Does anyone have any thing simular to it...
ok thx
Re: [HELP] Admin chat -
E-Rage - 26.01.2010
Quote:
Originally Posted by ((Lorenc))
Hello I've been searching the forum on how to make a admin chat like /a [text] but i couldn't find anything in dcmd. It was all strcmp and which in that case i am not using strcmp. I copied the one with the prefix one of xadmin and i tryed the v admin one but they got me lots of errors...
Does anyone have any thing simular to it...
ok thx
|
it's like the /pm commmand the different is just change "/pm" to "/a" and change "true" to "false"
can you send me the /pm script ?
Re: [HELP] Admin chat -
Lorenc_ - 26.01.2010
Umm download the server package and use base.pwn........
Re: [HELP] Admin chat - suhrab_mujeeb - 04.08.2011
i would recommend u to download an rp script or an admin script and study it
Re: [HELP] Admin chat -
Toreno - 04.08.2011
Try this.
pawn Код:
dcmd_a(playerid, params[]) {
new str[128], msg[128];
if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, -1, "USAGE: /a [text]");
format(str, sizeof(str), "Admin %s says: %s", GetPlayerNameEx(playerid), msg);
SendClientMessageToAll(-1, str);
return 1;
}
stock GetPlayerNameEx(playerid) {
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
return PlayerName;
}
Re: [HELP] Admin chat -
PrawkC - 04.08.2011
shitty troll is shitty
Re: [HELP] Admin chat -
Wesley221 - 04.08.2011
pawn Код:
COMMAND:a(playerid, cmdtext[])
{
if(PlayerInfo[i][Adminlevel] >= 1 || IsPlayerAdmin(i))
{
new string[128], name[24]
GetPlayerName(playerid, name, sizeof name);
format(string, sizeof string, "|- Admin chat -| %s(%i): %s", name, playerid, cmdtext[3]);
SendAdminMessage(-1, string);
} else return SendClientMessage(playerid, -1, "You need to be admin to use this");
return 1;
}
SendAdminMessage(color, text[])
{
foreach(Player, i)
{
if(PlayerInfo[i][Adminlevel] >= 1 || IsPlayerAdmin(i))
{
SendClientmessage(i, color, text);
}
}
return 0;
}
This will send a message between the admins. So if youre not an admin, you wouldnt be able to see this. Also, change the PlayerInfo[i][Adminlevel] to your own variable
Untested
Re: [HELP] Admin chat -
Kingunit - 04.08.2011
With admin chat you mean a chat that only administrators can see right? Do you have a admin script in your gamemode?
EDIT :Wesley got it above, check that ^^