Why this doesnt works?
#1

Hi everyone, im trying to allow only admins to use a name like "Carl" the normal users Name_Lastname so i tried this but doesnt works.

pawn Код:
if(PlayerInfo[playerid][pAdmin] < 1 || namestring == -1)
    {
        SendClientMessage(playerid, COLOR_LIGHTGREEN, "Server RolePlay");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "_________________________________________________________________________");
        SendClientMessage(playerid, COLOR_WHITE, "Tu Nombre no es aceptado.");
        SendClientMessage(playerid, COLOR_WHITE, "Tienes que usar un nombre con el formato:");
        SendClientMessage(playerid, COLOR_WHITE, "Nombre_Apellido tampoco se aceptan nombres de famosos Gracias.");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "_________________________________________________________________________");
        Kick(playerid);
        return 1;
    }
Thanks you so much if you could help me with this.
Reply
#2

Well you did this:

Код:
 if(PlayerInfo[playerid][pAdmin] < 1 || namestring == -1)
The:

Код:
 ||
Means or, I think you were trying to make it and, which is:

Код:
 &&
So make it like this:

Код:
 if(PlayerInfo[playerid][pAdmin] < 1 && namestring == -1)
Not sure if it would work but worth a try .
Reply
#3

I don't get it why does everyone insist kicking people for a bad name why not make command for them to change there name ingame..
Reply
#4

I tried by this 2 ways and dint work well...

@buzz I just want admins allowed to use Names without the lastname.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)