04.05.2013, 12:48
Hi guys
i think this my topic 3 about this problem
what is Bug ?
sometime after Close samp-server.exe and back again to Game ( samp-server.exe is run ) i can join with any password
Sorry for my english
this is PAWN
i think this my topic 3 about this problem
what is Bug ?
sometime after Close samp-server.exe and back again to Game ( samp-server.exe is run ) i can join with any password
Sorry for my english
this is PAWN
pawn Код:
enum pInfo
{
// Temp Values
pLoggedIn,
pSpawn,
// Permanent Values
pIP[16],
pOwner,
pLevel,
pMinutes,
pHours,
pGender,
pAge,
pMoney,
pBank,
pModel,
pAdmin,
pBanned,
Float:pX,
Float:pY,
Float:pZ,
pInt,
pVW,
pFac,
pFacRank,
pFacLeader,
pWeapon[13],
pWeaponAmmo[13],
pHospital,
pFacDuty,
pFacDiv,
pFacDivLeader,
pBiz,
pVBiz,
pHouse,
pVHouse,
pJob,
pJobSkill[MAX_JOBS],
pTPackages,
pMPackages,
pDPackages,
pMaterials,
pWeed,
pCrack,
pHasCellphone,
pCellphone,
pPhonebook,
pDice,
pCigar,
pSpeedo,
pSprunk,
pSpray,
pRope,
pBlindfold,
pWT,
pWTC,
pGas,
pRadio,
Float:pHealth,
Float:pArmor,
pInternet,
pSong[MAX_MUSIC],
pPrison,
pPrisonTime,
pPrisonReason[64],
pPrisonBy[32],
pWanted,
pWanted1[64],
pWanted2[64],
pWanted3[64],
pWanted4[64],
pWanted5[64],
pWanted6[64],
pCrimes,
pArrested,
pContract,
pContractBy[32],
pTutorial,
pWarns,
pWarn1[64],
pWarn2[64],
pWarn3[64],
pFlag[65],
pNMute,
pSpawnFreeze,
pFam,
pFamRank,
pCSuccess,
pCFail,
pHelper,
pVeh,
vModel,
Float:vX,
Float:vY,
Float:vZ,
Float:vA,
vC1,
vC2,
vPJ,
pVehMod[14],
vLocked,
pGangMod,
pFacMod,
pBanAppealer,
pCarLic, //
pFlyLic,
pBoatLic,
pGunLic,
pPainPerk,
pAccent[16],
// VIP
pVIP,
pVIPDay,
pVIPMonth,
pVIPHour,
pVIPTemp,
// VIP Job
pVIPJob,
// VIP Car
pVVeh,
vVModel,
Float:vVX,
Float:vVY,
Float:vVZ,
Float:vVA,
vVC1,
vVC2,
vVPJ,
pVVehMod[14],
vVLocked,
pVIPBuddy,
pDeliverTruck,
pNew,
pRefPoints,
pTester,
pFightStyle,
pScope,
pCookies,
pOldskool,
// mask
pMask,
pMaskuse,
// Toys
pToyModel[10],
Float:pToyX[10],
Float:pToyY[10],
Float:pToyZ[10],
Float:pToyRX[10],
Float:pToyRY[10],
Float:pToyRZ[10],
Float:pToySX[10],
Float:pToySY[10],
Float:pToySZ[10],
pReward,
pFish[5],
pLoyal,
pLoyalTag,
pLPoints,
pStoned,
pGate[3],
pSafeAdmin
}
new PlayerInfo[MAX_PLAYERS][pInfo]
pawn Код:
else if(dialogid == 1) // Register
{
if(response)
{
if(strlen(inputtext) > 256)
{
SendClientMessage(playerid, COLOR_GREY, "Password can't be longer than 256 characters.");
ShowDialog(playerid, 1);
return 1;
}
new file[64], IP[16], string[128], password[256];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
if(!dini_Exists(file))
{
GetPlayerIp(playerid, IP, sizeof(IP));
dini_Create(file);
WP_Hash(password, sizeof(password), inputtext);
dini_Set(file, "Password", password);
dini_Set(file, "IP", IP);
PlayerInfo[playerid][pLevel] = 1;
dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
format(string, sizeof(string), "SERVER: {FFFFFF}You have successfully registered on {FF6347}Nest Life Roleplay{FFFFFF}. (Password: %s)", inputtext);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
ShowDialog(playerid, 2);
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You have chosen to quit the server.");
SetTimerEx("kickp", 2000, false, "i", playerid);
}
}
else if(dialogid == 2) // Login
{
if(response)
{
new file[64], password[256], IP[16], password2[256];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
WP_Hash(password2, sizeof(password2), inputtext);
format(password, sizeof(password), "%s", dini_Get(file, "Password"));
if(strcmp(password, inputtext,true) && strcmp(password, password2, true))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
ShowDialog(playerid, 2);
return 1;
}