Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Gamemode Creado con el tutorial de Zume-Zero (Dr.Marlboro)
- * Créditos:
- * Zume-Zero (Dr.Marlboro)
- * Este es un Gamemode creado desde 0 como base para que los demįs puedan usarlo
- Fįcilmente.
- * Sistema de guardado en Y_INI, almacena:
- * Contraseńa.
- * Nivel administrativo.
- * Nivel.
- * Dinero.
- * Sexo.
- * Edad.
- * Comprobar si estį registrado.
- * Posición (X,Y,Z,R).
- * Vida.
- * Chaleco.
- * Interior.
- * VirtualWorld.
- * Ropa.
- */
- #include <a_samp>
- #include <YSI\y_ini>
- #include <Streamer>
- // Macros.
- #define ARCHIVO_L "Usuarios/%s.ini"
- #define NOMBRE_SERVER "Servidor creado con el tutorial de Zume-Zero"
- #define GAMEMODE_TEXTO "Version 1.0"
- #define WEB_SERVER "www.Google.com" // (?
- #define PASS_RCON "sdKLw3FKSDFKLcsdklńf" // Rcon, la cambian a como la quieran.
- #define MAPA_SERVER "Los Santos"
- #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- // Créditos en main()
- #define CREADO_CON_TUTO_DE "Zume-Zero (Dr.Marlboro)"
- #define YO_PROGRAMADOR "AQUI PON TU NOMBRE"
- // Diįlogos.
- #define DIALOG_REGISTRO 8541
- #define DIALOG_LOGEO 8542
- #define DIALOG_SEXO 8543
- #define DIALOG_EDAD 8544
- // Pragma
- #pragma tabsize 0
- // Enumeración de variables del usuario.
- enum Info
- {
- pKey[32],
- pAdmin,
- pNivel,
- pDinero,
- pSexo,
- pEdad,
- pRegistrado,
- Float:pPos_x,
- Float:pPos_y,
- Float:pPos_z,
- Float:pPos_r,
- Float:pVida,
- Float:pChaleco,
- pInterior,
- pVirtualWorld,
- pRopaPuesta,
- };
- new DatosPJ[MAX_PLAYERS][Info];
- // Textdraws
- new Text:CajaSola,
- Text:TeclaInfo,
- Text:TutorialDraw[MAX_PLAYERS][2];
- // Forward's
- forward YaPuedePasar(playerid);
- forward TutorialCargar(playerid);
- forward MostrarLogin(playerid);
- forward CargarInfo_datos(playerid,name[],value[]);
- main(){
- printf("* Información: Gamemode Roleplay.\n\n* Créditos.\n * Creado con el tutorial de %s\n * Por %s\n", CREADO_CON_TUTO_DE, YO_PROGRAMADOR);
- }
- stock CargarTextdraws()
- {
- /* Caja para el tutorial */
- CajaSola =
- TextDrawCreate(661.000000, 150.000000, "_");
- TextDrawBackgroundColor (CajaSola, 255);
- TextDrawFont (CajaSola, 1);
- TextDrawLetterSize (CajaSola, 0.500000, 13.000000);
- TextDrawColor (CajaSola, -1);
- TextDrawSetOutline (CajaSola, 0);
- TextDrawSetProportional (CajaSola, 1);
- TextDrawSetShadow (CajaSola, 1);
- TextDrawUseBox (CajaSola, 1);
- TextDrawBoxColor (CajaSola, 493813612);
- TextDrawTextSize (CajaSola, -30.000000, 0.000000);
- TextDrawSetSelectable (CajaSola, 0);
- /* Info en el tutorial */
- TeclaInfo =
- TextDrawCreate(346.000000, 250.000000, "Presiona la tecla 'Y' cada 6 segundos para pasar..");
- TextDrawBackgroundColor (TeclaInfo, 255);
- TextDrawFont (TeclaInfo, 3);
- TextDrawLetterSize (TeclaInfo, 0.310000, 1.600000);
- TextDrawColor (TeclaInfo, -1);
- TextDrawSetOutline (TeclaInfo, 1);
- TextDrawSetProportional (TeclaInfo, 1);
- TextDrawSetSelectable (TeclaInfo, 0);
- }
- public OnGameModeInit()
- {
- // Configuración, esto no lo toquen, se edita allį arriba en los macros.
- SendRconCommand("hostname " NOMBRE_SERVER);
- SetGameModeText(GAMEMODE_TEXTO);
- SendRconCommand("weburl " WEB_SERVER);
- SendRconCommand("rcon_password " PASS_RCON);
- SendRconCommand("mapname "MAPA_SERVER);
- /* Esto si */
- SetWorldTime(23); // Con esto siempre serį de noche
- UsePlayerPedAnims();
- CargarTextdraws(); // Carga textdraw's.
- for (new i = 0; i < MAX_PLAYERS; i++){
- TutorialDraw[i][0] = TextDrawCreate(310.000000, 157.000000, "~R~ROLEPLAY SIGNIFICA");
- TextDrawAlignment(TutorialDraw[i][0] , 2);
- TextDrawBackgroundColor(TutorialDraw[i][0] , 255);
- TextDrawFont(TutorialDraw[i][0] , 1);
- TextDrawLetterSize(TutorialDraw[i][0] , 0.330000, 1.800000);
- TextDrawColor(TutorialDraw[i][0] , -1);
- TextDrawSetOutline(TutorialDraw[i][0] , 0);
- TextDrawSetProportional(TutorialDraw[i][0] , 1);
- TextDrawSetShadow(TutorialDraw[i][0] , 1);
- TextDrawSetSelectable(TutorialDraw[i][0] , 0);
- TutorialDraw[i][1] = TextDrawCreate(310.000000, 182.000000, "~W~Bienvenido al servidor, recuerda que es roleplay y lalalalalalala tatatatatatatatataa~N~Tatata LAlalalala Y LAlalalal Y no se");
- TextDrawAlignment(TutorialDraw[i][1] , 2);
- TextDrawBackgroundColor(TutorialDraw[i][1] , 255);
- TextDrawFont(TutorialDraw[i][1] , 1);
- TextDrawLetterSize(TutorialDraw[i][1] , 0.230000, 1.300000);
- TextDrawColor(TutorialDraw[i][1] , -1);
- TextDrawSetOutline(TutorialDraw[i][1] , 0);
- TextDrawSetProportional(TutorialDraw[i][1] , 1);
- TextDrawSetShadow(TutorialDraw[i][1] , 1);
- TextDrawSetSelectable(TutorialDraw[i][1] , 0);
- SetSpawnInfo(i, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
- }
- return 1;
- }
- stock RegistrarJugador(playerid, password[]){
- if(IsPlayerConnected(playerid)){
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"datos");
- INI_WriteString(File,"Contra", password);
- INI_Close(File);
- SetPVarInt(playerid, "HaLogueado", 1);
- SetPlayerPos(playerid, 2770.641113, -1871.648925, 22.665542);
- InterpolateCameraPos(playerid, 2770.641113, -1871.648925, 22.665542, 2761.425292, -1992.413574, 18.984594, 12000);
- InterpolateCameraLookAt(playerid, 2770.638427, -1876.626953, 22.197479, 2764.325683, -1996.359497, 17.975938, 6000);
- ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_MSGBOX, "Registro de sexo.", "{37B9F5}æQué sexo?", "Masculino", "Femenino");
- }
- return 1;
- }
- // Loguear jugador.
- stock LogearJugador(playerid){
- SetPlayerColor(playerid,-1);
- new string[150];
- format(string, sizeof(string), "Bienvenido %s!", NombreJugador(playerid));
- SendClientMessage(playerid, -1, string);
- SetPVarInt(playerid, "HaLogueado", 1);
- TogglePlayerSpectating(playerid, 0);
- SetPlayerScore(playerid,DatosPJ[playerid][pNivel]);
- GivePlayerMoney(playerid,DatosPJ[playerid][pDinero]);
- SpawnPlayer(playerid);
- return 1;
- }
- // Guardarį los datos
- stock GuardarDatosUser(playerid){
- if(IsPlayerConnected(playerid)){
- if(GetPVarInt(playerid, "HaLogueado") == 1){
- new Nombre_PJ[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nombre_PJ, sizeof(Nombre_PJ));
- if(INI_Exist(Nombre_PJ)){
- new Archivo_PJ[13+MAX_PLAYER_NAME+1],
- Float:X, Float:Y, Float:Z, Float:angulo, // Posición X, Y, Z, A.
- Float:health, Float:chaleco; // Vida, Chaleco.
- format(Archivo_PJ ,sizeof Archivo_PJ, ARCHIVO_L, Nombre_PJ);
- new INI:File = INI_Open(Archivo_PJ);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerHealth(playerid,health);
- GetPlayerArmour(playerid,chaleco);
- GetPlayerFacingAngle(playerid, angulo);
- INI_SetTag(File,"datos");
- INI_WriteInt(File,"Admin",DatosPJ[playerid][pAdmin]);
- INI_WriteInt(File,"Nivel",DatosPJ[playerid][pNivel]);
- INI_WriteInt(File,"Sexo",DatosPJ[playerid][pSexo]);
- INI_WriteInt(File,"Edad",DatosPJ[playerid][pEdad]);
- INI_WriteInt(File,"Registrado",DatosPJ[playerid][pRegistrado]);
- INI_WriteInt(File,"Dinero",GetPlayerMoney(playerid));
- INI_WriteFloat(File,"Pos_x",X);
- INI_WriteFloat(File,"Pos_y",Y);
- INI_WriteFloat(File,"Pos_z",Z);
- INI_WriteFloat(File,"SPos_r",angulo);
- INI_WriteFloat(File,"Vida",health);
- INI_WriteFloat(File,"Chaleco",chaleco);
- INI_WriteInt(File,"VirtualWorld",GetPlayerVirtualWorld(playerid));
- INI_WriteInt(File,"Interior",GetPlayerInterior(playerid));
- INI_WriteInt(File,"RopaPuesta",DatosPJ[playerid][pRopaPuesta]);
- INI_Close(File);
- }
- }
- }
- return 1;
- }
- public CargarInfo_datos(playerid,name[],value[]){
- INI_Int("Admin",DatosPJ[playerid][pAdmin]);
- INI_Int("Nivel",DatosPJ[playerid][pNivel]);
- INI_Int("Sexo",DatosPJ[playerid][pSexo]);
- INI_Int("Edad",DatosPJ[playerid][pEdad]);
- INI_Int("Registrado",DatosPJ[playerid][pRegistrado]);
- INI_Int("Dinero",DatosPJ[playerid][pDinero]);
- INI_Float("Pos_x",DatosPJ[playerid][pPos_x]);
- INI_Float("Pos_y",DatosPJ[playerid][pPos_y]);
- INI_Float("Pos_z",DatosPJ[playerid][pPos_z]);
- INI_Float("SPos_r",DatosPJ[playerid][pPos_r]);
- INI_Float("Vida",DatosPJ[playerid][pVida]);
- INI_Float("Chaleco",DatosPJ[playerid][pChaleco]);
- INI_Int("VirtualWorld",DatosPJ[playerid][pVirtualWorld]);
- INI_Int("Interior",DatosPJ[playerid][pInterior]);
- INI_Int("RopaPuesta",DatosPJ[playerid][pRopaPuesta]);
- return 0;
- }
- forward LoadUser_pass(playerid,name[],value[]);
- public LoadUser_pass(playerid,name[],value[]){
- INI_String("Contra",DatosPJ[playerid][pKey], 32);
- return 1;
- }
- stock INI_Exist(nickname[]){
- new tmp[128];
- format(tmp,sizeof(tmp),ARCHIVO_L, nickname);
- return fexist(tmp);
- }
- stock UserPath(playerid){
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),ARCHIVO_L,playername);
- return string;
- }
- stock IsNumeric(string[]){
- for (new i = 0, j = strlen(string); i < j; i++){
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
- stock NombreJugador(playerid){
- new NombrePJ[24];
- GetPlayerName(playerid,NombrePJ,24);
- new N[24];
- strmid(N,NombrePJ,0,strlen(NombrePJ),24);
- for(new i = 0; i < MAX_PLAYER_NAME; i++){
- if (N[i] == '_') N[i] = ' ';
- }
- return N;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, -1, "SERVER: CARGANDO...");
- SetTimerEx("MostrarLogin", 4000, 0, "d", playerid);
- return 1;
- }
- // Mostrarį las cįmaras del inicio.
- stock CamarasIniciales(playerid){
- SetPlayerPos(playerid, 2717.178466, -1994.410278, 13.986422);
- InterpolateCameraPos(playerid, 2717.178466, -1994.410278, 13.986422, 2631.317138, -1996.975463, 18.373538, 13000);
- InterpolateCameraLookAt(playerid, 2712.781494, -1996.772094, 14.283123, 2635.082763, -2000.088745, 17.311382, 6000);
- }
- // Mostrarį los diįlogos.
- stock MostrarAccion(playerid){
- new NombrePJ[MAX_PLAYER_NAME];
- GetPlayerName(playerid, NombrePJ, MAX_PLAYER_NAME);
- if(INI_Exist(NombrePJ)){
- SendClientMessage(playerid, 0x13112237, "{37B9F5}<!> SERVER: {E3E4ED}Bienvenido al servidor, ingresa tu contraseńa para continuar jugando!.");
- INI_ParseFile(UserPath(playerid), "LoadUser_pass", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid,DIALOG_LOGEO,DIALOG_STYLE_PASSWORD ," ","Ingresa tu contraseńa.","Entrar","Salir");
- return 1;
- }
- else{
- SendClientMessage(playerid, 0x13112237, "{37B9F5}<!> SERVER: {E3E4ED}Bienvenido al servidor, ingresa una contraseńa para registrarte!");
- ShowPlayerDialog(playerid,DIALOG_REGISTRO,DIALOG_STYLE_PASSWORD ," ","Esta cuenta no estį registrada, introduce una contraseńa.","Registrar","Salir");
- return 1;
- }
- }
- public MostrarLogin(playerid){
- ClearChatbox(playerid); // Limpia el chat para el usuario.
- CamarasIniciales(playerid); // Coloca la cįmara de login.
- MostrarAccion(playerid); // Muestra los diįlogos segśn si estį o no registrado/a.
- SetPlayerVirtualWorld(playerid, playerid+324);
- SetPlayerInterior(playerid, 0);
- }
- ClearChatbox(playerid){
- for(new i = 0; i < 40; i++){
- SendClientMessage(playerid, -1, "");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason){
- GuardarDatosUser(playerid);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- // Cuando se registre para que vea el tutorial
- if(GetPVarInt(playerid, "VeraTutorial") == 1){
- PasarAlTuto(playerid);
- return 1;
- }
- // Esto es lo que pasarį cuando muera, irį al hospital
- if(GetPVarInt(playerid, "HaMuerto") == 1){
- SetPVarInt(playerid, "HaMuerto", 0);
- SetPlayerPos(playerid, 1183.31, -1325.01, 13.58);
- SetPlayerFacingAngle(playerid, -90);
- SetPlayerSkin(playerid, DatosPJ[playerid][pRopaPuesta]);
- return 1;
- }
- SetPlayerPos(playerid,DatosPJ[playerid][pPos_x],DatosPJ[playerid][pPos_y],DatosPJ[playerid][pPos_z]);
- SetPlayerVirtualWorld(playerid, DatosPJ[playerid][pVirtualWorld]);
- SetPlayerInterior(playerid, DatosPJ[playerid][pInterior]);
- SetPlayerFacingAngle(playerid, DatosPJ[playerid][pPos_r]);
- SetPlayerHealth(playerid, DatosPJ[playerid][pVida]);
- SetPlayerArmour(playerid, DatosPJ[playerid][pChaleco]);
- SetPlayerSkin(playerid, DatosPJ[playerid][pRopaPuesta]);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason){
- SetPVarInt(playerid, "HaMuerto", 1);
- return 1;
- }
- public TutorialCargar(playerid){
- SetPVarInt(playerid, "ViendoTutorial", 1);
- SetPVarInt(playerid, "VeraTutorial", 1);
- SpawnPlayer(playerid);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
- if(GetPVarInt(playerid, "EstaEnTuto") == 1){
- if(newkeys == KEY_YES){
- if(GetPVarInt(playerid, "PuedePasar") == 0){
- return PasarAlTuto(playerid);
- }
- else{
- return GameTextForPlayer(playerid, "~N~~N~~N~~N~~N~~G~ESPERA 6 SEGUNDOS PARA PASAR..", 3000, 3);
- }
- }
- }
- return 1;
- }
- stock PasarAlTuto(playerid){
- if(GetPVarInt(playerid, "ViendoTutorial") == 1){
- PlayAudioStreamForPlayer(playerid, "http://photoshopforo.host22.com/servidores/ZumeZero/Mente%20en%20Blanco%20-%20Borrachos%20y%20Grifos%20oficial.mp3");
- ClearChatbox(playerid);
- SetPVarInt(playerid, "EstaEnTuto", 1);
- SetPVarInt(playerid, "PuedePasar", 1);
- SetPVarInt(playerid, "ViendoTutorial", 2);
- CamarasIniciales(playerid);
- TextDrawSetString(TutorialDraw[playerid][0] , "~r~Bienvenido al server");
- TextDrawSetString(TutorialDraw[playerid][1] , "Bienvenido al servidor, te avisamos que en un roleplay no puedes cagar en la calle~N~Lalalaal Y tatatata Tarta - Mudo lala~N~Te sugerimos el comando de dudas lala.");
- TextDrawShowForPlayer(playerid, TeclaInfo);
- TextDrawShowForPlayer(playerid, TutorialDraw[playerid][1] );
- TextDrawShowForPlayer(playerid, TutorialDraw[playerid][0] );
- TextDrawShowForPlayer(playerid, CajaSola);
- SetTimerEx("YaPuedePasar", 5000, false, "d", playerid);
- }
- else if (GetPVarInt(playerid, "ViendoTutorial") == 2){
- ClearChatbox(playerid);
- SetPVarInt(playerid, "PuedePasar", 1);
- SetPVarInt(playerid, "ViendoTutorial", 3);
- TextDrawSetString(TutorialDraw[playerid][0] , "~G~Estado de Los Santos");
- TextDrawSetString(TutorialDraw[playerid][1] , "Bienvenido al servidor, te avisamos que en un roleplay no puedes cagar en la calle~N~\
- Lalalaal Y tatatata Tarta - Mudo lala~N~Te sugerimos el comando de dudas lala.");
- SetTimerEx("YaPuedePasar", 5000, false, "d", playerid);
- }
- else if (GetPVarInt(playerid, "ViendoTutorial") == 3){
- ClearChatbox(playerid);
- SetPVarInt(playerid, "PuedePasar", 1);
- SetPVarInt(playerid, "ViendoTutorial", 4);
- TextDrawSetString(TutorialDraw[playerid][0] , "~P~Que es MG");
- TextDrawSetString(TutorialDraw[playerid][1] , "Bienvenido al servidor, te avisamos que en un roleplay no puedes cagar en la calle~N~\
- Lalalaal Y tatatata Tarta - Mudo lala~N~Te sugerimos el comando de dudas lala.");
- SetTimerEx("YaPuedePasar", 5000, false, "d", playerid);
- }
- else if (GetPVarInt(playerid, "ViendoTutorial") == 4){
- ClearChatbox(playerid);
- SetPVarInt(playerid, "PuedePasar", 1);
- SetPVarInt(playerid, "ViendoTutorial", 5);
- SetPlayerPos(playerid, 496.425262, -1535.254028, 21.594314);
- InterpolateCameraPos(playerid, 496.425262, -1535.254028, 21.594314, 511.795501, -1558.237670, 29.789680, 6000);
- InterpolateCameraLookAt(playerid, 497.239257, -1540.187255, 21.586820, 507.171386, -1556.408935, 29.267198, 3000);
- TextDrawSetString(TutorialDraw[playerid][0] , "~R~Que es PG");
- TextDrawSetString(TutorialDraw[playerid][1] , "Bienvenido al servidor, te avisamos que en un roleplay no puedes cagar en la calle~N~\
- Lalalaal Y tatatata Tarta - Mudo lala~N~Te sugerimos el comando de dudas lala.");
- SetTimerEx("YaPuedePasar", 5000, false, "d", playerid);
- }
- else if (GetPVarInt(playerid, "ViendoTutorial") == 5){
- ClearChatbox(playerid);
- SetPVarInt(playerid, "ViendoTutorial", 0);
- SetPVarInt(playerid, "PuedePasar", 0);
- SetPVarInt(playerid, "EstaEnTuto", 0);
- TextDrawSetString(TutorialDraw[playerid][0] , "");
- TextDrawSetString(TutorialDraw[playerid][1] , "");
- TextDrawHideForPlayer(playerid, TutorialDraw[playerid][0] );
- TextDrawHideForPlayer(playerid, TutorialDraw[playerid][1] );
- TextDrawHideForPlayer(playerid, CajaSola);
- TextDrawHideForPlayer(playerid, TeclaInfo);
- if(DatosPJ[playerid][pSexo] == 1){
- SetPlayerSkin(playerid, 183);
- DatosPJ[playerid][pRopaPuesta] = GetPlayerSkin(playerid);
- }
- else if(DatosPJ[playerid][pSexo] == 2){
- SetPlayerSkin(playerid, 251);
- DatosPJ[playerid][pRopaPuesta] = GetPlayerSkin(playerid);
- }
- SetPlayerPos(playerid, 1719.77, -1705.45, 13.50);
- GivePlayerMoney(playerid, 3000);
- SendClientMessage(playerid, -1, "{FFFF00}SERVER: {FFFFFF}Bienvenido al servidor, recuerda que es roleplay no puedes andar golpeando.");
- SendClientMessage(playerid, -1, "{FFFF00}SERVER: {FFFFFF}Recuerda visitar nuestra pįgina web: "WEB_SERVER);
- SetCameraBehindPlayer(playerid);
- DatosPJ[playerid][pRegistrado] = true;
- SetPlayerInterior(playerid, 0), SetPlayerVirtualWorld(playerid, 0);
- GuardarDatosUser(playerid);
- StopAudioStreamForPlayer(playerid);
- }
- return 1;
- }
- public YaPuedePasar(playerid){
- SetPVarInt(playerid, "PuedePasar", 0);
- }
- // Diįlogos.
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
- switch(dialogid){
- // Registro del sexo.
- case DIALOG_SEXO:{ // Diįlogo
- if(!response){ // Femenino
- DatosPJ[playerid][pSexo] = 2;
- SetPlayerSkin(playerid, 253);
- DatosPJ[playerid][pRopaPuesta] = GetPlayerSkin(playerid);
- }
- else{ // Masculino
- DatosPJ[playerid][pSexo] = 1;
- SetPlayerSkin(playerid, 294);
- DatosPJ[playerid][pRopaPuesta] = GetPlayerSkin(playerid);
- }
- ShowPlayerDialog(playerid, DIALOG_EDAD, DIALOG_STYLE_INPUT, "Registro de Edad", "{37B9F5}æQué edad tienes?", "Enviar", "");
- }
- // Registro de edad.
- case DIALOG_EDAD:{
- if(response){
- if(!IsNumeric(inputtext)) return ShowPlayerDialog(playerid, DIALOG_EDAD, DIALOG_STYLE_INPUT, "Registro de Edad", "{37B9F5}Śnicamente nśmeros. æQué edad tienes?", "Enviar", "");
- if(strval(inputtext) < 18 || strval(inputtext) > 80) return ShowPlayerDialog(playerid, DIALOG_EDAD, DIALOG_STYLE_INPUT, "Registro de Edad", "{37B9F5}Mķnimo 18, Mįximo 80. æQué edad tienes?", "Enviar", "");
- DatosPJ[playerid][pEdad] = strval(inputtext);
- SetTimerEx("TutorialCargar", 3000, 0, "d", playerid);
- GameTextForPlayer(playerid, "CARGANDO TUTORIAL..",3000,3);
- return 1;
- }
- else{
- ShowPlayerDialog(playerid, DIALOG_EDAD, DIALOG_STYLE_INPUT, "Registro de Edad", "{37B9F5}æQué edad tienes?", "Enviar", "");
- }
- return 1;
- }
- // Diįlogo de logueo
- case DIALOG_LOGEO:{
- if(response == 1){
- if (!strcmp(inputtext,DatosPJ[playerid][pKey]))
- {
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
- INI_ParseFile(UserPath(playerid), "CargarInfo_datos", .bExtra = true, .extra = playerid);
- LogearJugador(playerid);
- }
- else{
- ShowPlayerDialog(playerid,DIALOG_LOGEO,DIALOG_STYLE_PASSWORD ,"Login","Contraseńa incorrecta, inténta nuevamente.","Entrar","Salir");
- return 1;
- }
- }
- else{
- SendClientMessage(playerid, -1, "Fuiste expulsado del servidor automįticamente.");
- Kick(playerid);
- }
- return 1;
- }
- // Registro
- case DIALOG_REGISTRO:{
- if(response == 1){
- if(strlen(inputtext) > 24){
- ShowPlayerDialog(playerid,DIALOG_REGISTRO,DIALOG_STYLE_PASSWORD ,"","La contraseńa debe tener como mįximo 24 carįcteres.","Registrar","Salir");
- return 1;
- }
- if(isnull(inputtext)){
- ShowPlayerDialog(playerid,DIALOG_REGISTRO,DIALOG_STYLE_PASSWORD,"","Ingresa una contraseńa","Registrar","Salir");
- return 1;
- }
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
- RegistrarJugador(playerid,inputtext);
- return 1;
- }
- else{
- SendClientMessage(playerid, -1, "Fuiste expulsado del servidor automįticamente.");
- Kick(playerid);
- }
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment