25.02.2010, 20:20
This is code from register/login system
and when i register my nick, and left server and again join i need to register again and always same but my accout is saved in scriptfiles can someone help me
-tnx alot
if need i will put "OnPlayerDialogRespone"
Код:
public OnPlayerRequestClass(playerid, classid) { PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0); PlayerInfo[playerid][pModel] = Peds[classid][0]; if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1) { ClearChatbox(playerid, 10); SendClientMessage(playerid, COLOR_GREEN, " ~ Dobrodosli na Zagreb City Roleplay~"); SendClientMessage(playerid, COLOR_RED, " Koristi 12 znakova u svojoj sifri! "); SendClientMessage(playerid, COLOR_YELLOW2, " "); SendClientMessage(playerid, COLOR_YELLOW2, " "); SendClientMessage(playerid, COLOR_YELLOW2, " "); SendClientMessage(playerid, COLOR_YELLOW2, " "); SendClientMessage(playerid, COLOR_YELLOW2, " "); SendClientMessage(playerid, COLOR_YELLOW2, " "); if (gPlayerAccount[playerid] != 0) { new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname)); format(loginstring,sizeof(loginstring),"Dobrodosli, %s\nTo ime je registrirano.\nSada se mozes ulogirati:",loginname); ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Ulogiranje",loginstring,"Login","Izlaz"); } else { gPlayerAccount[playerid] = 1; new regstring[128]; new regname[64]; GetPlayerName(playerid,regname,sizeof(regname)); format(regstring,sizeof(regstring),"Dobrodosli, %s\nTo ime nije registrirano.\nMolimo da se registrirate:",regname); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Registracija",regstring,"Registriraj","Odustani"); } //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0); PlayerInfo[playerid][pModel] = Peds[classid][0]; SetPlayerTeamFromClass(playerid,classid); } else SpawnPlayer(playerid); return false;
-tnx alot
if need i will put "OnPlayerDialogRespone"