SA-MP Forums Archive
Admin chat help - 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 chat help (/showthread.php?tid=481309)



Admin chat help - lulo356 - 15.12.2013

Hello,

I got a admin chat but its only for /rcon admins, how can you make it for every admin its for a filterscript(luxadmin)
Quote:

dcmd_a(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new msg[300], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "[Admin] %s: %s", name, params);
print(msg);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, COLOR_BLUE, msg);
}
}
}else{
SendClientMessage(playerid, COLOR_RED, "[AdminTalk] You're not in a admin!");
}
return 1;
}




Re: Admin chat help - LeeXian99 - 15.12.2013

Try switch
pawn Код:
if(IsPlayerAdmin(i))
to
pawn Код:
if(IsPlayerLuxAdminLevel(i))



Re: Admin chat help - Toni - 15.12.2013

At the top of your script:
#include <ladmin>

Replace if(IsPlayerAdmin(playerid)) with if(IsPlayerLuxAdm(playerid))

Replace if(IsPlayerAdmin(i)) with if (IsPlayerLuxAdm(i))


Re: Admin chat help - newbie scripter - 15.12.2013

Use
pawn Код:
AccInfo[i][Level] >= 1
but if u chat with "#" or "%" its achat in luxadmin


Re: Admin chat help - lulo356 - 15.12.2013

Quote:
Originally Posted by newbie scripter
Посмотреть сообщение
Use
pawn Код:
AccInfo[i][Level] >= 1
but if u chat with "#" or "%" its achat in luxadmin
Thanks!!!, Do you know maybe how to change it to /a the code is:

if(text[0] == '#' && AccInfo[playerid][Level] >= 1)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
MessageToAdmins(green,string);
#if ADM_CHAT_LOG == true
SaveIn("AdmChatLog",string);
#endif
return 0;
}


Re: Admin chat help - newbie scripter - 15.12.2013

typing # and chating is included in luxadmin , no need to add it again. if u want to make an admin chat in lux admin i will edit this post.


Re: Admin chat help - lulo356 - 15.12.2013

Do u got also a DCMD apm?


Re: Admin chat help - newbie scripter - 15.12.2013

i will make one later.


Re: Admin chat help - chevyseba1 - 15.12.2013

why not use zcmd instead?


Re: Admin chat help - lulo356 - 15.12.2013

Because luxadmis fs is not based on that