public SetPlayerSpawn(playerid) { if(IsPlayerConnected(playerid)) { if(sincronizando[playerid] == 1) { return 1; } spawnado[playerid] = 1; if(PlayerInfo[playerid][pTut] == 0) { if(sincronizando[playerid] == 1) { return 1; } gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1; TogglePlayerControllable(playerid, 0); SetPlayerVirtualWorld(playerid,playerid+1); RegistrationStep[playerid] = 1; ClearChatbox(playerid, 8); ShowPlayerDialog(playerid,DIALOG_TUTORIAL,DIALOG_STYLE_MSGBOX,"Informaзoes Basicas!","Voce й Homem ou Mulher (Selecione)","Homem","Mulher"); ClearChatbox(playerid, 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),"Senha Erada\nPor favor informe a senha correta:",loginname); ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Logar",loginstring,"Logar","Sair"); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 4) { Ban(playerid); } } } if(dialogid == DIALOG_TUTORIAL && response == 0) { SendClientMessage(playerid,0xFF0000AA,"Ok,Voce й Homem."); PlayerInfo[playerid][pSex] = 1; SetPlayerSkin(playerid, 23); PlayerInfo[playerid][pModel] = 23; } if(dialogid == DIALOG_TUTORIAL && response == 1) { SendClientMessage(playerid,COLOR_DBLUE,"Ok,Voce й Mulher."); PlayerInfo[playerid][pSex] = 2; SetPlayerSkin(playerid, 189); PlayerInfo[playerid][pModel] = 193; } 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, "Este nome de usuario ja esta sendo usando , por favor escolha otro"); 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),"Bem vindo, %s\nVoce nao tem uma conta.\nPor favor registre-se:",regname); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Registrar",regstring,"Registrar","Sair"); } } } else { Kick(playerid); } return 1; }
Originally Posted by JustinSton
Jб consegui ajeitar
Fiz vбrios dialogs massa pro meu server |
Originally Posted by Suporte_bnv
Quote:
Peguei um Gm com varios dialogs e fiz aki mais nem terminei.. |