I don't want to login wit Firstname_Lastname
#1

Hi there! I use Carlito's Roleplay Gamemode and i don't want to login with Firstname_Lastname ...
Quote:

ResetStats(playerid);//Setting variables to 0.
ClearScreen(playerid);//Clearing the users screen from SA-MP messages.
ShowScriptStats(playerid);//Showing the script information.
new first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
if(RPName(PlayerName(playerid),first,last))
{
SendClientMessage(playerid,COLOR_YELLOW,"_________ ___________________________________________");
SendClientMessage(playerid,COLOR_LIGHTYELLOW2," Immigration: ");
new sendername[MAX_PLAYER_NAME];
new accstring[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(accstring, sizeof(accstring), "CRP_Scriptfiles/Accounts/%s.ini", sendername);
new File: hFile = fopen(accstring, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You are already a citizen, type your password below.");
fclose(hFile);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You are not a citizen, type your desired password to register.");
}
SendClientMessage(playerid,COLOR_YELLOW,"_________ ___________________________________________");
}
else
{
KickPlayer(playerid,"System","Invalid Name, Correct Format: Firstname_lastname.");
}
return 1;

I found that but i don't know how to modify it ... please help me ... thanks!
Reply
#2

pawn Код:
ResetStats(playerid);//Setting variables to 0.
    ClearScreen(playerid);//Clearing the users screen from SA-MP messages.
    ShowScriptStats(playerid);//Showing the script information.

    SendClientMessage(playerid,COLOR_YELLOW,"____________________________________________________");
    SendClientMessage(playerid,COLOR_LIGHTYELLOW2,"            Immigration:              ");
   
    new sendername[MAX_PLAYER_NAME];
    new accstring[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(accstring, sizeof(accstring), "CRP_Scriptfiles/Accounts/%s.ini", sendername);
    new File: hFile = fopen(accstring, io_read);
    if (hFile)
    {
        SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You are already a citizen, type your password below.");
        fclose(hFile);
    }
    else
    {
        SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You are not a citizen, type your desired password to register.");
    }
    SendClientMessage(playerid,COLOR_YELLOW,"____________________________________________________");
    return 1;
Try that out.
Reply
#3

Yeap it worked ... Thanks a lot man , you have a beer from me )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)