Jump to content
  • 0

Inregistrare


GiGiMuScHi

Question

7 answers to this question

Recommended Posts

if(fexist(string))

{

gPlayerAccount[playerid] = 1;

new loginstring[128];

new loginname[64];

GetPlayerName(playerid,loginname,sizeof(loginname));

format(loginstring,sizeof(loginstring),"{FFFFFF}Bine ai Venit, {FFAF00}%s\n{FFFFFF}Tasteaza parola pentru a te loga:",loginname);

ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");

return 1;

}

else

{

gPlayerAccount[playerid] = 0;

new regstring[128];

new regname[64];

GetPlayerName(playerid,regname,sizeof(regname));

format(regstring,sizeof(regstring),"{FFFFFF}Bine ai Venit, {FFAF00}%s\n{FFFFFF}Tasteaza o parola pentru a te inregistra.",regname);

ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");

return 1;

}

Respecta Si Vei Fi Respectat !!!

Link to comment
Share on other sites

Asta este tot ce am gasit cu

if(dialogid==12345)
:

if(dialogid == 12345)

{

    if(strlen(inputtext))

    {

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "users/%s.ini", sendername);

new File: hFile = fopen(string, io_read);

if (hFile)

{

SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");

fclose(hFile);

return 1;

}

new tmppass[64];

strmid(tmppass, inputtext, 0, strlen(inputtext), 255);

//Encrypt(tmppass);

OnPlayerRegister(playerid,tmppass);

}

else

{

new regstring[128];

new regname[64];

GetPlayerName(playerid,regname,sizeof(regname));

format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname);

ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");

}

}

}

else

{

Kick(playerid);

}

if(dialogid == 668 && response)

{

if(!strcmp(inputtext, "Light", true))

{

TextDrawHideForPlayer(playerid, SunGlasses);

TextDrawBoxColor(SunGlasses, 0x00000025);

TextDrawShowForPlayer(playerid, SunGlasses);

}

if(!strcmp(inputtext, "Normal", true))

{

TextDrawHideForPlayer(playerid, SunGlasses);

TextDrawBoxColor(SunGlasses, 0x00000040);

TextDrawShowForPlayer(playerid, SunGlasses);

}

if(!strcmp(inputtext, "Dark", true))

{

TextDrawHideForPlayer(playerid, SunGlasses);

TextDrawBoxColor(SunGlasses, 0x00000055);

TextDrawShowForPlayer(playerid, SunGlasses);

}

if(!strcmp(inputtext, "Darkest", true))

{

TextDrawHideForPlayer(playerid, SunGlasses);

TextDrawBoxColor(SunGlasses, 0x00000065);

TextDrawShowForPlayer(playerid, SunGlasses);

}

}

if(dialogid == DIALOG_STYLES)

{

if(response)

{

if(listitem == 1)

{

ShowPlayerDialog(playerid, DIALOG_STYLES+1, DIALOG_STYLE_LIST, "Fight Styles", "Elbow\nBoxe\nGrab and kick\nStreet fight\nKungFu\nNormal", "Select", "Cancel");

}

}

return 1;

}

if(dialogid == DIALOG_STYLES+1)

{

if(response)

{

if(listitem == 0)

{

SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);

FightStyle[playerid] = 0;

}

if(listitem == 1)

{

SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);

FightStyle[playerid] = 1;

}

if(listitem == 2)

{

SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);

FightStyle[playerid] = 2;

}

if(listitem == 3)

{

SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);

FightStyle[playerid] = 3;

}

if(listitem == 4)

{

SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);

FightStyle[playerid] = 4;

}

if(listitem == 5)

{

SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);

FightStyle[playerid] = 5;

}

}

return 1;

}

return 1;

}

Respecta Si Vei Fi Respectat !!!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.