helpp - 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: helpp (
/showthread.php?tid=385294)
helpp -
Wonderweiss - 15.10.2012
how can i make this code
Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ Online Admins ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 2: {
AdmRank = "Moderator";
ChangeColor = Color_Moderator;
}
case 3: {
AdmRank = "Master Moderator";
ChangeColor = Color_Master_Moderator;
}
case 4: {
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
to not display the admins and to display this message
Код:
if(strcmp(cmd, "/admins", true) == 0) {
SendPlayerFormattedText(playerid,"Admins are always online on the server so dont try to break the /rules", 0);
return 1;
}
AW: helpp -
BiosMarcel - 15.10.2012
I don't see the use of it
Re: helpp -
Wonderweiss - 15.10.2012
i want to remove lux admin /admins command i think its better i want a message to be displayed as this:
Admins are always online on the server so dont try to break the /rules
AW: helpp -
BiosMarcel - 15.10.2012
remove the command ^^ mark it and press delete
Re: helpp -
Wonderweiss - 15.10.2012
ok .. but can i ask u something i got ur log FS and i cant get it to work while complile i get this error O.o :
Код:
C:\Users\Bojan\Desktop\backup\LVDM\pawno\include\OPSP.inc(22) : fatal error 111: user error: OnPlayerShootPlayer ERROR You must include it in your game mode, not in your filterscript!
AW: helpp -
BiosMarcel - 15.10.2012
Wait i look
AW: helpp -
BiosMarcel - 15.10.2012
Try this Include
Re: helpp -
Wonderweiss - 15.10.2012
ok i fixed it i didnt have OnPlayerShootPlayer include