30.01.2010, 06:44
I go onto my server (GTA RP), and then the box comes up so I type my password in, and then nothing happens. If I press anything on the spawn box, the box comes back up.
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, " ~ Welcome to ReelWurld RolePlay! ~"); if (gPlayerAccount[playerid] != 0) { new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname)); format(loginstring,sizeof(loginstring),"Welcome to RWRP, %s\nthis account is registered.\nPlease login, or use a different name:",loginname); ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"RWRP 0.1 Login",loginstring,"Login","Exit"); } else { gPlayerAccount[playerid] = 0; new regstring[128]; new regname[64]; GetPlayerName(playerid,regname,sizeof(regname)); format(regstring,sizeof(regstring),"Welcome to RWRP, %s\nthis account is not registered.\nPlease register an account:",regname); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"RWRP 0.1 Register",regstring,"Register","Exit"); } PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0); PlayerInfo[playerid][pModel] = Peds[classid][0]; } else SpawnPlayer(playerid); return false; }
public OnPlayerSpawn(playerid) { InitLockDoors(playerid); STDPlayer[playerid] = 0; if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "** You need to login before you spawn. **"); KickPlayer[playerid] = 1; } if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); } else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); } SetPlayerWeapons(playerid); SetPlayerSpawn(playerid); PlayerFixRadio(playerid); if(MapIconsShown[playerid] != 1) { MapIconsShown[playerid] = 1; for(new i = 0; i < sizeof(BizzInfo); i++) { SetPlayerMapIcon(playerid,i + 1,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ],36,COLOR_LIGHTRED); } for(new i = 0; i < sizeof(SBizzInfo); i++) { SetPlayerMapIcon(playerid,i + 20,SBizzInfo[i][sbEntranceX],SBizzInfo[i][sbEntranceY],SBizzInfo[i][sbEntranceZ],36,COLOR_LIGHTRED); } } return 1; }
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),"WRONG PASSWORD\nPlease enter the correct password:",loginname); ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit"); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 5) { 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, "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); } return 1; }