Pomoc Dialog login

Započeo [BC]Dexy, Februar 28, 2010, 15:16:53 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovako imam problem s dialogom koj malo voli zezati ... sve ljepo napravio s tuta tu na forumu ali kada udem u igru pise da se reg.. ja reko ajde i onda ja idem reg i napisem pass i oni kaze da nemogu reg jer acc vec postoji ... molim pomoc..
Mape:

))-((

Filescripte:

Dexy's Speedo/Fuel

Gamemodes:

))-((




SampArena FOREVER <3


Pa lijepo si izbrises acc i ponovo se reggas :D

Citat: Kiki_Radeon poslato Februar 28, 2010, 15:53:49 POSLE PODNE
Pa lijepo si izbrises acc i ponovo se reggas :D
pokuso ... neide ... eto cod kako mi je u scripti....

public OnPlayerRequestClass(playerid, classid)
{
new string[128];
PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pModel] = Peds[classid][0];
if (classid == 1)
{
format(string, sizeof(string), "~y~> ~p~Police Chief ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 2)
{
format(string, sizeof(string), "~y~> ~p~FBI/ATF Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 3)
{
format(string, sizeof(string), "~y~> ~p~National Guard General ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 4)
{
format(string, sizeof(string), "~y~> ~p~Fire/Ambulance Chief ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 5)
{
format(string, sizeof(string), "~y~> ~p~La Cosa Nostra Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 6)
{
format(string, sizeof(string), "~y~> ~p~Yakuza Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 7)
{
format(string, sizeof(string), "~y~> ~p~Mayor ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 8)
{
format(string, sizeof(string), "~y~> ~p~Hitman Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 9)
{
format(string, sizeof(string), "~y~> ~p~News Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 10)
{
format(string, sizeof(string), "~y~> ~p~Taxi Cab Company Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 11)
{
format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else
{
format(string, sizeof(string), "~y~> ~g~Civilian ~y~<");
GameTextForPlayer(playerid,string,3500,6);
}
SetPlayerTeamFromClass(playerid,classid);
SetupPlayerForClassSelection(playerid);
if (gPlayerAccount[playerid] != 0)
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Dobro dosli, %s\nTaj nadimak je registriran.\nLogirajte se:",loginname);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Izlaz");
SendClientMessage(playerid, COLOR_LIGHTRED, "Ako se ne logirate u roku od 30s bit cete izbaceni sa servera!");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW2, "INFO: Registrirajte se i uredite svoje papire.");
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Dobro dosli, %s\nTaj nadimak nije registiran.\nRegistriraj se:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Registriraj","Izlaz");
}
SetPlayerCameraPos(playerid, 1890.1014,-1194.7969,25.8091);
SetPlayerCameraLookAt(playerid, 1933.4393,-1196.2479,18.8163);
//PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pModel] = Peds[classid][0];
SetPlayerTeamFromClass(playerid,classid);
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if(response)
{
if(dialogid == 12346 || dialogid == 12347)
{
    if(strlen(inputtext))
    {
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"KRIVA LOZINKA\nMolimo vas da unesete tocnu lozinku:",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Izlaz");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
}
}
if(dialogid == 12345)
{
    if(strlen(inputtext))
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Taj nadimak je vec zauzet, uzmite drugi nadimak.");
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),"Dobro dosli, %s\nTaj nadimak nije registriran.\nRegistriraj se:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Registriraj","Izlaz");
}
}
}
else
{
Kick(playerid);
}
return 1;
}



Mape:

))-((

Filescripte:

Dexy's Speedo/Fuel

Gamemodes:

))-((




SampArena FOREVER <3