Allz0r
Membru-
Posts
29 -
Joined
-
Last visited
Never
About Allz0r
- Birthday 03/15/1993
Allz0r's Achievements
-
Ok, am luat FS cashbox dar am o problema cu acest Fs. Problema consta: - fs nu are comanda /locate si doar goto, Si acest /goto din fs l-am schimbat eu in locate. - Merge un joc la al2lea se scrica. Poza: /*===================================================================================================*\ ||===================================================================================================|| || ________ ________ ___ _ ______ ______ ________ || || \ | _____| | ____ | | \ | | | _ \ | _ \ | ____ | / || || ======== \ | |_____ | |____| | | |\ \ | | | | | | | |_| / | |____| | / ======== || || | | _____ | | ____ | | | \ \| | | | | | | _ \ | ____ | | || || ======== / ______| | | | | | | | \ \ | | |_| | | | \ \ | | | | \ ======== || || / |________| |_| |_| |_| \__| |______/ |_| \_| |_| |_| \ || || || ||===================================================================================================|| || Created April 28th 2008 by =>Sandra<= || || Do NOT remove any credits!! || \*===================================================================================================*/ #include <a_samp> /* Difficulty Modes: 1 = Checkpoint appears on location of the cashbox 2 = Only the camera of players will be looking to cashbox location. They can review using /cashboxhint */ //CONFIGURATION:::::::: #define CashboxModel 1210 // Briefcase-model #define MinCashboxValue 20000 #define MaxCashboxValue 50000 #define ValuedropPerSecond 0 #define DifficultyMode 2 new UseTextdraw = 0; //END OF CONFIGURATION new CashboxPickup; new CashboxOwner = INVALID_PLAYER_ID; new CashboxValue; new Float:CashboxX; new Float:CashboxY; new Float:CashboxZ; new IsGameStarted; new DropValueTimer; new Text:ValueText; new IsTextdrawCreated; new vps = ValuedropPerSecond; new mode = DifficultyMode; new IsCashboxPickedUp; new Float:DropLocation[3] = {1677.1796,1447.8167,10.7823}; new Float:CashboxLocations[][3] = { {2227.74, 1516.43, 10.82}, {-724.44, 1402.81, 13.07}, {-1940.61, 1086.14, 53.09}, {-2344.37, -459.59, 80.01}, {-1674.65, -543.03, 14.14}, {-2415.30, -2142.08, 52.37}, {-1527.47, -2291.62, -5.63}, {-1111.05, -2470.04, 76.59}, {-288.23, -2163.67, 28.63}, {-376.27, -2583.97, 138.17}, {378.32, -1885.70, 2.05}, {1120.86, -2065.82, 74.42}, {1583.25, -2286.55, 13.53}, {2718.67, -2385.16, 13.63}, {2744.79, -1944.55, 17.32}, {2041.71, -1715.58, 13.54}, {2771.79, -1354.51, 50.00}, {1102.96, -1092.89, 28.46}, {727.73, -1276.13, 13.64}, {755.31, -591.31, 18.01}, {360.91, -110.02, 1.22}, {-557.35, -541.28, 25.52}, {-273.04, -955.98, 38.30}, {1242.36, 327.17, 19.75}, {2791.64, 2225.64, 14.66}, {-1955.01, -986.97, 35.89}, {-2108.89, -2376.97, 30.62}, {1853.35, 2045.54, 10.85}, {2478.85, -1437.22, 25.49}, {-2241.50, 2462.93, 4.98}, {703.36, 267.78, 21.44}, {-599.09, -1080.95, 23.66}, {-2677.68, 1503.98, 2.07}, {2582.18, -2115.22, 1.11}, {-1954.97, -986.27, 35.89}, {541.41, 830.33, -39.44}, {-2876.66, 292.77, 6.96}, {-2192.16, 2409.51, 4.95}, {2615.91, -1730.39, 6.24}, {-529.81, -991.29, 24.55}, {-1048.33, -1306.72, 128.50}, {1227.20, 2584.68, 10.82}, {1016.48, 1411.63, 10.82}, {-1593.62, 802.54, 6.82}, {-2238.23, -2478.96, 31.19}, {917.43, 2402.92, 10.82}, {1312.97, -1965.60, 29.46}, {-120.59, -1531.31, 3.07}, {-2508.68, -53.19, 25.65}, {-2762.04, 105.18, 6.99}, {1367.53, 194.54, 19.55}, {-2655.83, -102.70, 3.99}, {2161.85, -102.76, 2.75}, {2535.77, 1342.55, 10.82}, {-2059.10, 890.89, 61.85}, {1188.14, 231.38, 19.56}, {1088.81, 1073.79, 10.83}, {422.96, 2539.45, 16.52}, {-227.49, 2709.91, 62.98}, {-347.38, 1581.21, 76.30}, {-208.08, 1127.93, 19.74}, {33.24, 1155.21, 19.69}, {1582.07, -2691.56, 6.12}, {1715.25, -1912.01, 13.56}, {286.36, -1145.15, 80.91} }; public OnFilterScriptInit() { print("--------------------------------------"); print(" Cashbox Filterscript by =>Sandra<= "); print("--------------------------------------"); if(mode == 1 || mode == 2) { SetTimer("StartNewCashboxGame", 30000, 0); } else { print("============================"); print(" Error: "); print(" Can't start CashboxGame "); print(" Reason: Invalid Difficulty "); print("============================"); } return 1; } public OnFilterScriptExit() { if(IsGameStarted == 1) { for(new i; i<MAX_PLAYERS; i++) { if(mode == 1) { DisablePlayerCheckpoint(i); } } } DestroyPickup(CashboxPickup); if(IsTextdrawCreated == 1) { TextDrawHideForAll(ValueText); TextDrawDestroy(ValueText); IsTextdrawCreated = 0; } return 1; } public OnPlayerConnect(playerid) { if(IsGameStarted == 1) { if(CashboxOwner == INVALID_PLAYER_ID) { if(mode == 1) { SetPlayerCheckpoint(playerid, CashboxX, CashboxY, CashboxZ, 1); } } } return 1; } public OnPlayerDisconnect(playerid, reason) { if(playerid == CashboxOwner) { new str[128], pName[MAX_PLAYER_NAME]; GetPlayerPos(playerid, CashboxX, CashboxY, CashboxZ); GetPlayerName(playerid, pName, sizeof(pName)); format(str, 128, "Detinatorul servietei %s (ID: %d) a iesit de pe server si a scapat servieta!", pName, playerid); SendClientMessageToAll(0xFFD700AA, str); CashboxPickup = CreatePickup(1210, 3, CashboxX, CashboxY, CashboxZ); CashboxOwner = INVALID_PLAYER_ID; if(mode == 1) { for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPlayerCheckpoint(i, CashboxX, CashboxY, CashboxZ, 1); } } } } return 1; } public OnPlayerDeath(playerid, killerid, reason) { if(playerid == CashboxOwner) { new str[128], pName[MAX_PLAYER_NAME]; GetPlayerPos(playerid, CashboxX, CashboxY, CashboxZ); GetPlayerName(playerid, pName, sizeof(pName)); format(str, 128, "Detinatorul servietei %s (ID: %d) a murit si a scapat servieta!", pName, playerid); SendClientMessageToAll(0xFFD700AA, str); CashboxPickup = CreatePickup(1210, 3, CashboxX, CashboxY, CashboxZ); CashboxOwner = INVALID_PLAYER_ID; if(mode == 1) { for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPlayerCheckpoint(i, CashboxX, CashboxY, CashboxZ, 1); } } } } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/servieta", true)==0) { if(mode == 2) { if(IsCashboxPickedUp == 1) { new str[128]; new pName[MAX_PLAYER_NAME]; GetPlayerName(CashboxOwner, pName, 24); format(str, 128, "%s (ID: %d) a luat servieta si o duce la destinatie!", pName, CashboxOwner); SendClientMessage(playerid, 0xFF0000AA, str); } else { new randX = -100+random(200); new randY = -100+random(200); SetPlayerCameraPos(playerid, CashboxX+randX, CashboxY+randY, (CashboxZ+60)); SetPlayerCameraLookAt(playerid, CashboxX, CashboxY, CashboxZ); TogglePlayerControllable(playerid, 0); SetTimerEx("ResetCam", 10000, 0, "i", playerid); } } return 1; } if(strcmp(cmdtext, "/locate", true)==0) { SetPlayerPos(playerid, 2227.74, 1516.43, 10.82); return 1; } return 0; } public OnPlayerEnterCheckpoint(playerid) { if(playerid == CashboxOwner) { PlayerPlaySound(playerid, 1054, 0, 0, 0); KillTimer(DropValueTimer); new str[128], pName[MAX_PLAYER_NAME]; if(mode == 1) { DisablePlayerCheckpoint(playerid); } CashboxOwner = INVALID_PLAYER_ID; GetPlayerName(playerid, pName, sizeof(pName)); format(str, 128, "%s (ID: %d) a dus servieta la destinatie! El/Ea a castigat $%d", pName, playerid, CashboxValue); SendClientMessageToAll(0xFFD700AA, str); GivePlayerMoney(playerid, CashboxValue); format(str, 128, "~y~Felicitari! ~n~ Ai castigat ~n~~g~$%d", CashboxValue); GameTextForPlayer(playerid, str, 4000, 3); SendClientMessageToAll(0xFFD700AA, "Un nou joc va incepe in 10 minute!"); SetTimer("StartNewCashboxGame", 600000, 0); IsGameStarted = 0; if(IsTextdrawCreated == 1) { TextDrawDestroy(ValueText); IsTextdrawCreated = 0; } } return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == CashboxPickup) { PlayerPlaySound(playerid, 1150, 0, 0, 0); new str[128], pName[MAX_PLAYER_NAME]; DestroyPickup(CashboxPickup); IsCashboxPickedUp = 1; CashboxOwner = playerid; GetPlayerName(playerid, pName, sizeof(pName)); format(str, 128, "%s (ID: %d) a luat servieta! Omoara-l inainte sa o duca la destinatie!", pName, playerid); SendClientMessageToAll(0xFFD700AA, str); if(mode == 1) { for(new i; i<MAX_PLAYERS; i++) { DisablePlayerCheckpoint(i); } } SetPlayerCheckpoint(playerid, DropLocation[0], DropLocation[1], DropLocation[2], 3); } return 1; } forward StartNewCashboxGame(); public StartNewCashboxGame() { IsGameStarted = 1; new str[128]; new rand = random(sizeof(CashboxLocations)); CashboxValue = MinCashboxValue+random(MaxCashboxValue-MinCashboxValue); CashboxPickup = CreatePickup(1210, 3, CashboxLocations[rand][0], CashboxLocations[rand][1], CashboxLocations[rand][2]); CashboxX = CashboxLocations[rand][0]; CashboxY = CashboxLocations[rand][1]; CashboxZ = CashboxLocations[rand][2]; format(str, 128, "O noua servieta, plina cu %d dolari, se afla undeva in San Andreas!", CashboxValue); SendClientMessageToAll(0xFFD700AA, str); if(vps > 0) { format(str, 128, "Valoarea acestei serviete va scadea cu $%d pe secunda!", ValuedropPerSecond); SendClientMessageToAll(0xFFD700AA, str); } SendClientMessageToAll(0xFFD700AA, "Obiectiv: Ia servieta inainte ca altcineva sa intre in posesia ei!"); for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(mode == 1) { SetPlayerCheckpoint(i, CashboxLocations[rand][0], CashboxLocations[rand][1], CashboxLocations[rand][2], 1); } else if(mode == 2) { new randX = -100+random(200); new randY = -100+random(200); SetPlayerCameraPos(i, CashboxX+randX, CashboxY+randY, (CashboxZ+60)); SetPlayerCameraLookAt(i, CashboxX, CashboxY, CashboxZ); TogglePlayerControllable(i, 0); SetTimerEx("ResetCam", 8000, 0, "i", i); SendClientMessage(i, 0x0E68CAA, "Puteti vedea din nou aceasta locatie folosind /servieta"); GameTextForPlayer(i, "~y~Hint:", 8000, 4); } } } DropValueTimer = SetTimer("DropCashboxValue", 1000, 1); } forward DropCashboxValue(); public DropCashboxValue() { if(IsTextdrawCreated == 1) { TextDrawDestroy(ValueText); IsTextdrawCreated = 0; } new TextString[40]; if(CashboxValue > 0) { CashboxValue -= ValuedropPerSecond; format(TextString, 40, "~y~Valoare Servieta: ~n~~y~$%d", CashboxValue); } if(CashboxValue <= 0) { CashboxValue = 0; SendClientMessageToAll(0xFFD700AA, "Servieta numai are nici-o valoare!"); format(TextString, 40, "~y~Valoare Servieta: ~n~~r~$%d", CashboxValue); KillTimer(DropValueTimer); } if(UseTextdraw == 1) { ValueText = TextDrawCreate(540, 410, TextString); IsTextdrawCreated = 1; TextDrawLetterSize(ValueText, 0.4, 1.2); TextDrawSetShadow(ValueText, 0); TextDrawUseBox(ValueText, 1); TextDrawBoxColor(ValueText, 0x000000AA); TextDrawShowForAll(ValueText); } } forward ResetCam(playerid); public ResetCam(playerid) { SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1); TogglePlayerSpectating(playerid, 0); }
-
Si eu vreau aceste event, am vazut ca multe servere il au.
-
Da, se pare ca ai mare dreptate. Multumesc mult acum am gasit:)
-
Salut cum fac si eu la serverul meu o chestie dasta? M-am uitat in gm sa vad daca gasesc chestia asta nu e... Vreau sa stiu cum o fac sau cum dau edit.. Poza:
-
public OnPlayerLogin(playerid,password[]) { new tmp2[256]; new string2[64]; new playername2[MAX_PLAYER_NAME]; new playernamesplit[3][MAX_PLAYER_NAME]; GetPlayerName(playerid, playername2, sizeof(playername2)); split(playername2, playernamesplit, '_'); format(string2, sizeof(string2), "Users/%s.ini", playername2); new File: UserFile = fopen(string2, io_read); if ( UserFile ) { new PassData[256]; new keytmp[256], valtmp[256]; fread( UserFile , PassData , sizeof( PassData ) ); keytmp = ini_GetKey( PassData ); if( strcmp( keytmp , "Key" , true ) == 0 ) { valtmp = ini_GetValue( PassData ); strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255); } if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 ) { new key[ 256 ] , val[ 256 ]; new Data[ 256 ]; while ( fread( UserFile , Data , sizeof( Data ) ) ) { key = ini_GetKey( Data ); if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); } if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); } if( strcmp( key , "HelperLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); } if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); } if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); } if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); } if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); } if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); } if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); } if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); } if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = strval( val ); } if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); } if( strcmp( key , "MuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuteTime] = strval( val ); } if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); } if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); } if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); } if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); } if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); } if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); } if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); } if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedDeaths] = strval( val ); } if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); } if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); } if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishes] = strval( val ); } if( strcmp( key , "BiggestFish" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBiggestFish] = strval( val ); } if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); } if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); } if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = strval( val ); } if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); } if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); } if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); } if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); } if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); } if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); } if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); } if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); } if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); } if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = strval( val ); } if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); } if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); } if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); } if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); } if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); } if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); } if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); } if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); } if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); } if( strcmp( key , "CookSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCookSkill] = strval( val ); } if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); } if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); } if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); } if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); } if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); } if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); } if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); } if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); } if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); } if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); } if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); } if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); } if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); } if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); } if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); } if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); } if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); } if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); } if( strcmp( key , "Gun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); } if( strcmp( key , "Gun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); } if( strcmp( key , "Gun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); } if( strcmp( key , "Gun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); } if( strcmp( key , "Ammo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); } if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); } if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); } if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); } if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); } if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); } if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); } if( strcmp( key , "CDPlayer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCDPlayer] = strval( val ); } if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWins] = strval( val ); } if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLoses] = strval( val ); } if( strcmp( key , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); } if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugPerk] = strval( val ); } if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMiserPerk] = strval( val ); } if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainPerk] = strval( val ); } if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTraderPerk] = strval( val ); } if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); } if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); } if( strcmp( key , "Mission" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMissionNr] = strval( val ); } if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); } if( strcmp( key , "FactionWarns" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFACWarns] = strval( val ); } if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = strval( val ); } if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuel] = strval( val ); } if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); } if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); } if( strcmp( key , "Crack" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrack] = strval( val ); } //if( strcmp( key , "CabinetTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCabinetTime] = strval( val ); } if( strcmp( key , "RobSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRobSkill] = strval( val ); } if( strcmp( key , "Rob" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRob] = strval( val ); } if( strcmp( key , "VirWorld" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVirWorld] = strval( val ); } if( strcmp( key , "pInteriorNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInteriorNr] = strval( val ); } if( strcmp( key , "HouseEntered" , true ) == 0 ) { val = ini_GetValue( Data ); HouseEntered[playerid] = strval( val ); } if( strcmp( key , "Instr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKi] = strval( val ); } if( strcmp( key , "Car1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey1] = strval( val ); } if( strcmp( key , "Car2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey2] = strval( val ); } }//end while fclose(UserFile);//close the file after everything has been read in the while } else { new loginstring[128]; new loginname[64]; GetPlayerName(playerid,loginname,sizeof(loginname)); format(loginstring,sizeof(loginstring),"\n{FFFFFF}Parola incorecta pentru acest cont - {FF0000}%s\n\n\n\n\n\n{FFFFFF}Introduceti din nou parola corecta.",loginname); ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FF0000}PAROLA GRESITA",loginstring,"Intra","Iesi"); fclose(UserFile); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 4) { Ban(playerid); } return 1; } PlayerInfo[playerid][pAdjustable] = 0; ResetPlayerMoney(playerid); ConsumingMoney[playerid] = 1; GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]); CurrentMoney[playerid] = PlayerInfo[playerid][pCash]; if(PlayerInfo[playerid][pReg] == 0) { PlayerInfo[playerid][pExp] = 0; PlayerInfo[playerid][pLevel] = 3; PlayerInfo[playerid][pSHealth] = 0.0; PlayerInfo[playerid][pHealth] = 50.0; PlayerInfo[playerid][pPos_x] = 446.2936; PlayerInfo[playerid][pPos_y] = -18.3816; PlayerInfo[playerid][pPos_z] = 1001.1328; PlayerInfo[playerid][pInt] = 1; PlayerInfo[playerid][pLocal] = 255; PlayerInfo[playerid][pTeam] = 3; PlayerInfo[playerid][pModel] = 183; new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start PlayerInfo[playerid][pPnumber] = randphone; PlayerInfo[playerid][pPhousekey] = 255; PlayerInfo[playerid][pPbiskey] = 255; PlayerInfo[playerid][pAccount] = 1000000; PlayerInfo[playerid][pReg] = 1; GivePlayerMoney(playerid, 5000); } if(PlayerInfo[playerid][pLevel] == -999) //autoban { Ban(playerid); } else if(PlayerInfo[playerid][pCK] > 0) { Kick(playerid); } SendClientMessage(playerid, 0x91C4CFF, " "); SendClientMessage(playerid, 0x91C4CFF, " "); SendClientMessage(playerid, 0x91C4CFF, " "); SendClientMessage(playerid, 0x91C4CFF, " "); SendClientMessage(playerid, COLOR_LIGHTBLUE, "====================================================================="); // 1 format(string2, sizeof(string2), "- Bun venit %s.",playername2); // 2 SendClientMessage(playerid, COLOR_WHITE,string2); printf("%s has logged in.",playername2); format(string2, sizeof(string2), "- Current Level %d.",PlayerInfo[playerid][pLevel]); // 5 SendClientMessage(playerid, COLOR_WHITE,string2); if (PlayerInfo[playerid][pAdmin] == 1) { format(string2, sizeof(string2), "- Admin level %d.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_RED,string2); } if (PlayerInfo[playerid][pAdmin] == 2) { format(string2, sizeof(string2), "- Admin level %d.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_RED,string2); } if (PlayerInfo[playerid][pAdmin] == 3) { format(string2, sizeof(string2), "- Admin level %d.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_RED,string2); } if (PlayerInfo[playerid][pAdmin] == 4) { format(string2, sizeof(string2), "- Admin level %d.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_RED,string2); } if (PlayerInfo[playerid][pAdmin] == 1337) { format(string2, sizeof(string2), "- Admin level %d.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_RED,string2); } if (PlayerInfo[playerid][pAdmin] == 1338) { format(string2, sizeof(string2), "- Admin level %d.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_RED,string2); } format(string2, sizeof(string2), "- Bani %d$ & %d Respect Points.",PlayerInfo[playerid][pCash], PlayerInfo[playerid][pExp]); // 5 SendClientMessage(playerid, COLOR_WHITE,string2); SendClientMessage(playerid, COLOR_LIGHTBLUE, "====================================================================="); // 6 SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1); if(gTeam[playerid] == 0) { gTeam[playerid] = 3; } else { gTeam[playerid] = PlayerInfo[playerid][pTeam]; } gPlayerLogged[playerid] = 1; SpawnPlayer(playerid); format(tmp2, sizeof(tmp2), "~w~Bun venit ~n~~r~~h~ %s", playername2); DateProp(playerid); GameTextForPlayer(playerid, tmp2, 300, 1); SendClientMessage(playerid, COLOR_YELLOW, motd); if(PlayerInfo[playerid][pFMember] < 255) { format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]); SendClientMessage(playerid, COLOR_YELLOW, tmp2); } } return 1; }
-
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),"\n{FFFFFF}Parola incorecta pentru acest cont - {FF0000}%s\n\n\n\n\n\nIntroduceti din nou parola corecta.",loginname); ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FF0000}PAROLA GRESITA",loginstring,"Intra","Iesi"); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 4) { Ban(playerid); } } } if(dialogid == 12345) { if(strlen(inputtext)) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Users/%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),"{FFFFFF}Bine ai venit, {FF0000}%s\n{FFFFFF}Tu nu esti inregistrat cu acest cont, va rugam sa va inregistrati.\n\n\n\nScrie parola aici {55FF55}- Va recomandam sa fie de minim 6 caractere.",regname); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Inregistrare",regstring,"Inregistrare","Iesi"); } } } else { Kick(playerid); } return 1; } Poftim
-
Salut azi din greseala am scris parola gresit la cont si am vazut ca s-a logat. Am iesit de pe server am bagat alta parola pusa la misto, surpriza merge. Cum rezolv acest bug? Va rog sa ma ajutati.
-
Am rezolvat problema, mi-ai fost de mare ajutor :X Multumesc, -IcE-
-
Exact asa am facut si nu a vrut....apare la mod Unknow )
-
Salut baieti, am si eu o problema am un gamemode care l-am configurat dupa bunul plac pe windows a mers perfect. Acum cand l-am urcat pe host care este pe Linux imi apare la mode Unknow sau ceva de genu. Aveti o solutie...?
-
pai cand am dat register contu a apraut in mysql da in scriptfiles nimic...
-
acu dupa problema aia am probleme cu /login. Deci fericit dupa ce am reusit sa fac aia, intru pe server spune sa dau /register parola, scriu o parola dau /login parola si serveru ia restart si se inchide din cauza unui crash . -------------------------- SA-MP Server: 0.3b R2 Exception At Address: 0x609C1D91 Registers: EAX: 0x00000001 EBX: 0x01912894 ECX: 0x00000000 EDX: 0x00000000 ESI: 0x01325C38 EDI: 0x01325C38 EBP: 0x0012F674 ESP: 0x0012F64C EFLAGS: 0x00010246 Stack: +0000: 0x01325C38 0x00733210 0x00000001 0x00927248 +0010: 0x000000FF 0x00000101 0x00000061 0x009241F0 +0020: 0x00927210 0x00000001 0x01976448 0x00401096 +0030: 0x01325C38 0x021BE83C 0x01A8B640 0x00402BB3 +0040: 0x01325C38 0x00000094 0x0012F6AC 0x021BE83C +0050: 0x00000000 0x01325C38 0x00000000 0xFBCC1901 +0060: 0x00000001 0x007330F8 0x007331FC 0x00735814 +0070: 0x00731858 0x0073499C 0x00731858 0x01912894 +0080: 0x01A8B640 0x00000000 0x01910020 0x00178DAC +0090: 0x00486CFB 0x01325C38 0x0012F714 0x00000092 +00A0: 0x01325C38 0x00000000 0x01325C38 0x0012F724 +00B0: 0x0012F718 0x0136CCD0 0x021BCE58 0x00000000 +00C0: 0x00000000 0x0136CCD0 0x00000000 0x021BCE58 +00D0: 0x0049C5C5 0x00000092 0x00731818 0x0012F860 +00E0: 0x00A2ABD0 0x0012FC8C 0x0000000F 0x000000A0 +00F0: 0x000000A0 0x00000098 0x0012F860 0xFFFFFF00 +0100: 0x7C910222 0x7C91019B 0x7C9101DB 0x0012FA68 +0110: 0x00000007 0x00A2ABD0 0x44898BFD 0x4386923D +0120: 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF +0130: 0x0012F7B0 0x00A20000 0x7C910222 0x00000002 Aveti o rezolvare?
-
Am rezolvat tot trebuia sa scot asta din Gm sa o inchid sa nu mai functioneze. ASTA CREAZA ACEA EROARE. samp_mysql_free_result() Ca sa nu mai aveti eroarea, o stergetii sau ii puneti // //samp_mysql_free_result()
-
#include <a_samp> #include <a_sampmysql> #include <core> #include <float> #include <a_npc> #include <time> #include <file> #include <utils> #include <streamer> #include <morphinc>