How could i make the server ignore admin names - 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: How could i make the server ignore admin names (
/showthread.php?tid=240713)
How could i make the server ignore admin names -
Deal-or-die - 16.03.2011
When the server GMXes if you are on admin duty EG a name that doesn't use the format EG: Firstname_Lastname
it ill kick you or force you to change your name, am i able to mark admins outta this?
pawn Код:
new playernamesplit[3][MAX_PLAYER_NAME];
split(Name, playernamesplit, '_');
if (!strlen(playernamesplit[0]) || !strlen(playernamesplit[1]))
{
new NameStr[MAX_PLAYER_NAME];
format(NameStr, sizeof(NameStr), "NONRPNAME%d", playerid);
SetPlayerName(playerid, NameStr);
printf("[system] %s has been forced to the name change menu.", Name);
//TogglePlayerControllable(playerid, false);
ShowPlayerDialog(playerid, 594, DIALOG_STYLE_INPUT, "Roleplay Name", "Please select a new, valid roleplaying name.", "Change", "Cancel");
SendClientMessage(playerid, WHITE, "Your name is not valid, please pick a new one. Refrain from using tags, please and include 1 underscore.");
}
by using something like
pawn Код:
if(Player[playerid][AdminDuty] >= 1)
Or
if(Player[playerid][AdminLevel] >= 1)
Cheers, Steve
Re: How could i make the server ignore admin names -
Stigg - 16.03.2011
Quote:
Originally Posted by Deal-or-die
When the server GMXes if you are on admin duty EG a name that doesn't use the format EG: Firstname_Lastname
it ill kick you or force you to change your name, am i able to mark admins outta this?
pawn Код:
new playernamesplit[3][MAX_PLAYER_NAME]; split(Name, playernamesplit, '_');
if (!strlen(playernamesplit[0]) || !strlen(playernamesplit[1])) { new NameStr[MAX_PLAYER_NAME]; format(NameStr, sizeof(NameStr), "NONRPNAME%d", playerid); SetPlayerName(playerid, NameStr);
printf("[system] %s has been forced to the name change menu.", Name); //TogglePlayerControllable(playerid, false); ShowPlayerDialog(playerid, 594, DIALOG_STYLE_INPUT, "Roleplay Name", "Please select a new, valid roleplaying name.", "Change", "Cancel"); SendClientMessage(playerid, WHITE, "Your name is not valid, please pick a new one. Refrain from using tags, please and include 1 underscore."); }
by using something like
pawn Код:
if(Player[playerid][AdminDuty] >= 1) Or if(Player[playerid][AdminLevel] >= 1)
Cheers, Steve
|
Yes something like that, you answered your own question.
Re: How could i make the server ignore admin names -
Deal-or-die - 16.03.2011
It would be something like
pawn Код:
else if(Player[playerid][AdminDuty] >= 1)
Or
else if(Player[playerid][AdminLevel] >= 1)
Right...? -.^
Re: How could i make the server ignore admin names -
Stigg - 16.03.2011
pawn Код:
if(Player[playerid][AdminLevel] >= 1)//if the player has any admin level
Re: How could i make the server ignore admin names -
Serbish - 16.03.2011
Quote:
Originally Posted by Stigg
pawn Код:
if(Player[playerid][AdminLevel] < 1)//if the player has any admin level
|
Actually it should be
pawn Код:
if(Player[playerid][AdminLevel] >= 1) // Minimum level 1 or higher.
Re: How could i make the server ignore admin names -
Stigg - 16.03.2011
Quote:
Originally Posted by Serbish
Actually it should be
pawn Код:
if(Player[playerid][AdminLevel] >= 1) // Minimum level 1 or higher.
|
No biggie, simple typo, already told him he's answered his own question.