31.03.2017, 18:01
Hola! bueno la cosa es si me podrian por favor decir como puedo crear un dialogo de registro y logeo con la gm de gf, ya intente cambiando las variables de uno normal de "pawnopedo2.com" y la cosa es que no me funciono , aqui les dejo las variables por si desean ayudarme .
Variable si esta o no registrado
Estos son los comandos que normalmente se utilizarian.
Y el enum con la informaciуn del jugador
De antemano muchisimas gracias al que desee ayudarme! Suerte cabasheros!
Variable si esta o no registrado
Код:
gPlayerAccount[playerid] = 0;
Код:
//-------------------------------[Login]-------------------------------------------------------------------------- if (strcmp(cmd, "/conectar", true) ==0 ) { if(IsPlayerConnected(playerid)) { new tmppass[64]; if(gPlayerLogged[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "SERVER:Ya Estas Conectado."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /conectar [password]"); return 1; } strmid(tmppass, tmp, 0, strlen(cmdtext), 255); Encrypt(tmppass); OnPlayerLogin(playerid,tmppass); } return 1; } if (strcmp(cmd, "/registrar", true) ==0 ) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "SERVER: Ya Estas Conectado."); return 1; } 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 nick Ya Esta Usado, Porfavor Escoja Otro."); fclose(hFile); return 1; } new tmppass[64]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /registrar [password]"); return 1; } strmid(tmppass, tmp, 0, strlen(cmdtext), 255); Encrypt(tmppass); OnPlayerRegister(playerid,tmppass); } return 1; } //----------------------------------[ooc]-----------------------------------------------
Код:
enum pInfo { pKey[128], pLevel, pAdmin, pDonateRank, gPupgrade, pConnectTime, pReg, pSex, pAge, pOrigin, pCK, pMuted, pExp, pCash, pAccount, pCrimes, pKills, pDeaths, pArrested, pWantedDeaths, pPhoneBook, pLottoNr, pFishes, pBiggestFish, pJob, pPayCheck, pHeadValue, pJailed, pJailTime, pMats, pDrugs, pLeader, pMember, pFMember, pRank, pChar, pContractTime, pDetSkill, pSexSkill, pBoxSkill, pLawSkill, pMechSkill, pJackSkill, pCarSkill, pNewsSkill, pDrugsSkill, pCookSkill, pFishSkill, Float:pHealth, Float:pSHealth, pInt, pLocal, pTeam, pModel, pPnumber, pPhousekey, pPbiskey, Float:pPos_x, Float:pPos_y, Float:pPos_z, pCarLic, pFlyLic, pBoatLic, pFishLic, pGunLic, pGun1, pGun2, pGun3, pGun4, pAmmo1, pAmmo2, pAmmo3, pAmmo4, pCarTime, pPayDay, pPayDayHad, pCDPlayer, pWins, pLoses, pAlcoholPerk, pDrugPerk, pMiserPerk, pPainPerk, pTraderPerk, pTut, pMissionNr, pWarns, pAdjustable, pFuel, pMarried, pMarriedTo[128], }; new PlayerInfo[MAX_PLAYERS][pInfo];