/admins problems - 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: /admins problems (
/showthread.php?tid=277502)
/admins problems -
DannySnoopy - 18.08.2011
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}||~||..::Las Ventures Role Play Admins::..||~||");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 7)
{
new admtext[64];
new string[128];
if(PlayerInfo[i][pAdmin] == 6) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "High Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Junior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Administrator"; }
else { admtext = "Moderator"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
format(string, 256, "{FF0000}%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
}
return 1;
}
return 0;
}
here's the warning
C:\Documents and Settings\InitialUser\My Documents\Downloads\samp03csvr_R2-2_win32\gamemodes\LVRP.pwn(185) : warning 217: loose indentation
C:\Documents and Settings\InitialUser\My Documents\Downloads\samp03csvr_R2-2_win32\gamemodes\LVRP.pwn(187) : warning 217: loose indentation
Re: /admins problems -
CrisTany - 18.08.2011
WHere is the 185 and 187 Line ? in this code I can't see
Re: /admins problems -
DannySnoopy - 18.08.2011
Quote:
Originally Posted by CrisTany
WHere is the 185 and 187 Line ? in this code I can't see
|
Oh sorry
185 - return1;
187 - return0;
Re: /admins problems -
DannySnoopy - 18.08.2011
anyone? :S
Re: /admins problems -
HyperZ - 18.08.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/admins", true) == 0) {
if(IsPlayerConnected(playerid)) {
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}||~||..::Las Ventures Role Play Admins::..||~||");
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 7) {
new admtext[64];
new string[128];
if(PlayerInfo[i][pAdmin] == 6) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "High Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Junior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Administrator"; }
else { admtext = "Moderator"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0) {
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else {
format(string, 256, "{FF0000}%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
}
return 1;
}
return 0;
}
Re: /admins problems -
DannySnoopy - 18.08.2011
thanks pal worked
DD yay ty
Re: /admins problems -
CrisTany - 18.08.2011
Код:
if (strcmp(cmdtext, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}||~||..::Las Ventures Role Play Admins::..||~||");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 7)
{
new admtext[64];
new string[128];
if(PlayerInfo[i][pAdmin] == 6) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "High Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Junior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Administrator"; }
else { admtext = "Moderator"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
format(string, 256, "{FF0000}%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
}
return 1;
}
return 0;
}