Admin System 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 System Help (
/showthread.php?tid=494404)
Admin System Help -
alishvasis - 13.02.2014
Hi Firends.How To Set This? Just Message To Admin Level 10 ?
This is code :
Код:
MessageToAdmins(COLOR_GREY,string);print(string);}
And This is My Admini LEvel 10
if(Account[playerid][pAdminlevel] == 10)
Re: Admin System Help -
terrow - 13.02.2014
Show the complete function 'MessageToAdmins'
Re: Admin System Help -
SwisherSweet - 13.02.2014
pawn Код:
CMD:a(playerid, params[])
{
new string[128];
if(Account[playerid][pAdminlevel] == 10)
if(isnull(params)) return SendClientMessage(playerid, ADMIN_ACTION,"•• /a [ text ].");
for(new j = 0; j < MAX_PLAYERS; j++) {
if(IsPlayerConnected(j) && Account[j][pAdminlevel] == 10) {
format(string, sizeof(string), "Admin Chat %s (id: %d): %s", Player[playerid][name], playerid, params);
SendClientMessage(j, 0x00F3FFFF, string);
}
}
return true;
}
There you go when using a cmd /a it will send all the admins the text the admin wants...
/a [Text]
Re: Admin System Help -
alishvasis - 13.02.2014
This is :
Код:
if(Options[Readcmds]==1){
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string), LanguageText[38],name,playerid,cmdtext);
if(Account[playerid][pAdminlevel] == 10)
{
MessageToAdmins(COLOR_GREY,string);print(string);}
}
I Put This But Not Working
Re: Admin System Help -
Mahde - 13.02.2014
Some thing like that will work under onplayertext
Код:
if(text[0] == '#' && Account[playerid][pAdminlevel] == 10)
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Admin Chat: %s(%d): %s",string,playerid,text[1]);
MessageToAdmins(green,string);
#if ADM_CHAT_LOG == true
SaveIn("AdmChatLog",string);
#endif
return 0;
}
_________________
Deal for 1 day! Hosted Tab for 7 $ !! contact : MahdiAsali at skype
Server Test: 37.142.239.201:8888
~~~~
xXx Stunt Paradise Awesome
Server IP:
Click Here!
Hosted Tab Game-MP for 10 Euro / per month
Hosted Tab + Server host 50 slots + Control Panel for 15 Euro
Skype: MahdiAsali
Ђ10 Euro for Hosted List
Re: Admin System Help -
anou1 - 13.02.2014
Код:
public ChannelAdmin(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (pInfo[i][Admin] >= 1)
{
SendClientMessage(i, color, string);
}
}
return 1;
}
This should work, just change the admin level.
Re: Admin System Help -
xo - 13.02.2014
Just made you this , will work
pawn Код:
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))if(Account[i][pAdminlevel] == 10)
{
SendClientMessage(i, color, string);
print(string);
}
}
}