how to change John_Smiff name format for user
#1

Hello everyone am looking for a bit of help with this script https://sampforum.blast.hk/showthread.php?tid=526143

What it is, the GM requires you to have the name format as (John_smiff) i would like it to be able to use what you like in a single name format (john) but not sure how to do so can anyone help me out on this

Thanks
Reply
#2

You must find out in script and remove it

pawn Код:
stock IsRPName(const name[], max_underscores = 1)
{
    new underscores = 0;
 
    if (name[0] < 'A' || name[0] > 'Z') return false; // first letter != capital
 
    for(new i = 1; i < strlen(name); i++)
    {
        if(name[i] != '_' && (name[i] < 'A' || name[i] > 'Z') && (name[i] < 'a' || name[i] > 'z')) return false; // a-zA-Z_
        if( (name[i] >= 'A' && name[i] <= 'Z') && (name[i - 1] != '_') ) return false; // unneeded capital letter
 
        if(name[i] == '_')
        {
            underscores++;
            if(underscores > max_underscores || i == strlen(name)) return false; // more than defined underline
            if(name[i + 1] < 'A' || name[i + 1] > 'Z') return false; // no capital letter after underline
        }
    }
 
    if (underscores == 0) return false; // no underline
 
    return true;
}
then go on public OnPlayerConnect(playerid)

and remove

pawn Код:
if(!IsRPName(name, 1))
{
                SendClientMessage(playerid, 0xDE5454FF, "You don't have a roleplaying name! Please reconnect using a name in Firstname_Lastname format!");
                SendClientMessage(playerid, 0xDE5454FF, "Make sure the name you choose is realistic, one you would use in real life! (i.e. ''John_Smith'')");
                SetTimerEx("DelayedKick", 450, false, "i", playerid);
                return false;
}
Reply
#3

getting loads of undefined symbol "GetPlayerRPName"
Reply
#4

In the script its a-lot of GetPlayerRPName so you have to change it with player name with GetPlayerName
Reply
#5

hmm getting loads of warning 202: number of arguments does not match definition now :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)