RP NAMES QUESTION
#1

Hello there,

I wanted to ask you,how can i let the players using their names instead of the RP names on a roleplaying gamemode (ex. Ravens Roleplay 0.3e)

Thanks in advance,i appreaciate that you read my topic!

Best regards,
George
Reply
#2

You need to show us some code!
But most likely the script will search for "_" somewhere in the name becouse that's what you use to split your name instead of space(that's invalid for names) so Yh.
Reply
#3

Connect to the server and get the message that is sent to you notifying that you are using an invalid RP name, then open your script and Hit CTRL+F and search for that message, you will find some function or multiple codes that checks for underscores (_) in the player's name once he connect to the server, Either show the whole code of it here or just delete it if you can deal with it.
Reply
#4

Quote:
Originally Posted by geohareas
Посмотреть сообщение
Hello there,

I wanted to ask you,how can i let the players using their names instead of the RP names on a roleplaying gamemode (ex. Ravens Roleplay 0.3e)

Thanks in advance,i appreaciate that you read my topic!

Best regards,
George
Try it:
Next code put into OnPlayerConnect:

pawn Код:
new name[MAX_PLAYER_NAME], pos = strfind(name, "_");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(pos == -1 || !(name[0] >= 'A' && name[0] <= 'Z' && pos+1 < strlen(name) && name[pos+1] >= 'A' && name[pos+1] <= 'Z'))
{
    SendPlayerMessage(playerid, -1, "Use RP nick! Example: Carl_Johnson, Stabker_Steepson");
    Kick(playerid);
    return 1;
}
(I dont test it, just write per few minutes. Sorry for my bad English )
Reply
#5

Quote:
Originally Posted by stabker
Посмотреть сообщение
Try it:
Next code put into OnPlayerConnect:

pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(!(name[0] >= 'A' && name[0] <= Z && strfind(name, "_") != -1 && strfind(name, "_")+1 <= strlen(name) && name[strfind(name, "_")+1] >= 'A' && strfind(name, "_")+1 <= 'Z'))
{
    SendPlayerMessage(playerid, -1, "Use RP nick! Example: Carl_Johnson, Stabker_Steepson");
    Kick(playerid);
    return 1;
}
(I dont test it, just write per few minutes. Sorry for my bad English )
He wants to do the opposite of that. He wants people to use ANY name instead of RP names on his rp server, which I find weird.
Reply
#6

Quote:
Originally Posted by EAsT-OAK_510
Посмотреть сообщение
He wants to do the opposite of that. He wants people to use ANY name instead of RP names on his rp server, which I find weird.
Oh... i'm idiot

geohareas, just find the message, that sends when player have nonRP nickname, find a checking and remove it.
Reply
#7

Quote:
Originally Posted by stabker
Посмотреть сообщение
Oh... i'm idiot
lol no, it took me a while to figure out what he was asking, but the way he wrote it sounds like he wants to remove the (firstname_lastname) RP name.
Reply
#8

Under OnPlayerConnect, there should be
pawn Код:
if(AntiName == 1)
    {
        if(namestring == -1)
        {
            format(string, sizeof(string),"%s, Has been kicked by the Anticheat Peter Griffin for Having an Unvalid Name",plname);
            SendClientMessageToAll(COLOR_NICERED, string);
            SendClientMessage(playerid, COLOR_YELLOW2, "Immigration Department: Your name is not acceptable.");
            SendClientMessage(playerid, COLOR_YELLOW2, "Hint: Your name must be in the format Firstname_Lastname.");
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for Invalid Name",d,m,y,h,mi,s,plname);
            KickLog(string);
            Kick(playerid);
            return 1;
        }
    }
Remove that,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)