NoName145 Posted November 16, 2022 Report Posted November 16, 2022 Am intampinat o problema, cand apas tasta f sau enter jucatorul nu intra in masina, am verificat gamemode-ul si nu gasesc o solutie, pur si simplu apas f ii da ca un mic slap si nu urca in nici o masina. Quote
AlexxAdv Posted November 17, 2022 Report Posted November 17, 2022 Arata sau verifica OnPlayerEnterVehicle, daca nu ai nimic aici, probabil il ai in OnPlayerStateChange Quote
NoName145 Posted November 17, 2022 Author Report Posted November 17, 2022 (edited) Observ ca este de la KEY_SECONDARY_ATTACK, cand o dezactivez din gm urca in masina, dar daca o activez la loc nu urca. if(newkeys & KEY_SECONDARY_ATTACK) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { new car = GetClosestVehicle(playerid); if(car != INVALID_VEHICLE_ID && IsPlayerNearVehicle(playerid,car,5)) { for(new i = 0; i < 10; i++) { if(PlayerInfo[playerid][pCarKey][i] != 0) { if(CarInfo[PlayerInfo[playerid][pCarKey][i]][Spawned] == car) SetVehicleParamsForPlayer(car, playerid, 0, 0); } } } if(UsedFly[playerid] == 1) { StopFly(playerid); UsedFly[playerid] = 0; SetPlayerHealthEx(playerid, 99); SendClientMessage(playerid, 0xFFADADFF, "Fly mode off."); } for(new i = 1; i < 14; i++) { if(PlayerToPoint(2.0, playerid, DynamicFactions[i][extX], DynamicFactions[i][extY], DynamicFactions[i][extZ])) { if(PlayerInfo[playerid][pMember] == i || i < 3 || DynamicFactions[i][fLock] == 1 || OnDuty[playerid] == 1) EnterFaction(playerid, i); } } for(new i = 1; i < 14; i++) { if(PlayerToPoint(2.0, playerid, DynamicFactions[i][fcX], DynamicFactions[i][fcY], DynamicFactions[i][fcZ])) { if(DynamicFactions[i][fVW] == GetPlayerVirtualWorld(playerid) && DynamicFactions[i][fInterior] == GetPlayerInterior(playerid)) ExitFaction(playerid, i); } } if(IsPlayerConnected(playerid)) { for(new i = 1; i < sizeof(HouseInfo); i++) { if(IsPlayerInRangeOfPoint(playerid,2,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) { if(InEvent[playerid] == 1) return 1; if(InWar[PlayerInfo[playerid][pMember]] == 1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti intra intr-o locuinta in timpul war-ului!"); if(PlayerInfo[playerid][pHouse] == i || HouseInfo[i][hLock] == 0 || OnDuty[playerid] == 1 || PlayerHit[playerid] != -1) { SetPlayerInterior(playerid,HouseInfo[i][hInterior]); SetPlayerPosEx(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]); PlayerInfo[playerid][pInt] = HouseInfo[i][hInterior]; PlayerInfo[playerid][pLocal] = i; SetPlayerVirtualWorld(playerid,HouseInfo[i][hVirtual]); InHouse[playerid] = i; HouseRadio(playerid, i); } else GameTextForPlayer(playerid, "~r~~h~Inchis", 1000, 1); } } for(new i = 1; i < sizeof(BizzInfo); i++) { if(IsPlayerInRangeOfPoint(playerid,2,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) && BizzInfo[i][bStatic] == 0) { if(InWar[PlayerInfo[playerid][pMember]] == 1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti intra intr-o afacere in timpul war-ului!"); if(GetPlayerCash(playerid) < BizzInfo[i][bFee]) return GameTextForPlayer(playerid, "~r~~h~Nu ai destui bani", 1000, 1); if(OnDuty[playerid] == 1 || PlayerHit[playerid] != -1) { } else if(BizzInfo[i][bLocked] == 1) return GameTextForPlayer(playerid, "~r~~h~Inchis", 1000, 1); if(BizzInfo[i][bType] == 6) { if(HaveFish[playerid] != 0) ShowPlayerDialog(playerid, DIALOG_FISH, DIALOG_STYLE_MSGBOX, "Vinde pestele:", "Vrei sa vinzi pestele in acest magazin?", "Da", "Nu"); } if(BizzInfo[i][bType] == 1) SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /withdraw, /transfer, /deposit."); if(BizzInfo[i][bType] == 9) SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /dice, /minesweeper."); if(BizzInfo[i][bType] == 8 || BizzInfo[i][bType] == 21) { SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /eat."); if(BizzInfo[i][bType] == { if(KG[playerid] != 0) { GiveJobSalary(playerid); DisablePlayerCheckpointEx(playerid); CP[playerid] = 0; GunoiKG[playerid] = 0; KG[playerid] = 0; PlayerInfo[playerid][pFarmerSkill] ++; Update(playerid, pFarmerSkillx); for(new m; m < 2; m++) { if(PlayerInfo[playerid][pDailyMission][m] == 4) CheckMission(playerid, m); } DestroyVehicle(JobVehicle[playerid]); JobVehicle[playerid] = 0, JobWorking[playerid] = 0; PlayerTextDrawHide(playerid, JobTD); } } } if(BizzInfo[i][bType] == 2) SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /buygun."); if(BizzInfo[i][bType] == 3) SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /drink."); if(BizzInfo[i][bType] == 5) SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /buydildo."); if(BizzInfo[i][bType] == 6 || BizzInfo[i][bType] == 20) SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /buy."); if(BizzInfo[i][bType] == 7) SendClientMessage(playerid,COLOR_WHITE,"Comenzi disponibile: /clothes, /glasses, /buyhat."); GivePlayerCash(playerid,-BizzInfo[i][bFee]); BizzInfo[i][bBalance] += BizzInfo[i][bFee]; BizzRadio(playerid, i); if(BizzInfo[i][bStatic] == 0) { SetPlayerInterior(playerid,BizzInfo[i][bInterior]); SetPlayerPosEx(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]); PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior]; PlayerInfo[playerid][pLocal] = i+99; SetPlayerVirtualWorld(playerid,BizzInfo[i][bVirtual]); InBussines[playerid] = i; Update(playerid, pCashx); new str1[184]; format(str1,sizeof(str1),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[i][bBalance],i); mysql_query(SQL,str1); format(str1, sizeof(str1), "~r~-$%d", BizzInfo[i][bFee]); GameTextForPlayer(playerid, str1, 1000, 1); } } } for(new i = 1; i < sizeof(HouseInfo); i++) { if(EditHouse[playerid] != 0) return 1; if(PlayerInfo[playerid][pSleeping] == 1) return 1; if(PlayerToPoint(2, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]) && HouseInfo[i][hVirtual] == GetPlayerVirtualWorld(playerid)) { SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]); InHouse[playerid] = -1; PlayRadio[playerid] = 0; StopAudioStreamForPlayer(playerid); } } for(new i = 1; i < sizeof(BizzInfo); i++) { if(PlayerInfo[playerid][pSleeping] == 1) return 1; if(PlayerToPoint(2, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]) && BizzInfo[i][bVirtual]==GetPlayerVirtualWorld(playerid)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]); if(i == 27) { TogglePlayerControllable(playerid, 0); SetTimerEx("UnFreezeStation", 1000, false, "i", playerid); } PlayerInfo[playerid][pLocal] = 255; SetPlayerVirtualWorld(playerid,0); InBussines[playerid] = -1; PlayRadio[playerid] = 0; StopAudioStreamForPlayer(playerid); } } for(new i; i < sizeof(Training); i++) { if(PlayerToPoint(2.0, playerid, Training[i][0], Training[i][1], Training[i][2]) && PlayerInfo[playerid][pMember] == i+1) { if(PlayerInfo[playerid][pWantedLevel] != 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti intra deoarece ai wanted!"); SetPlayerPosEx(playerid, 1062.1185, 2077.5059, 10.8352); SetPlayerVirtualWorld(playerid, i+1); SetPlayerInterior(playerid, 0); SCM(playerid, COLOR_YELLOW, "Bine ai venit in sala de antrenament! Daca vrei sa achizitionezi arme, foloseste comanda /guns."); InTraining[playerid] = 1; SetPVarInt(playerid, "Training", i); } } if(PlayerToPoint(3.0, playerid, 2337.1826, 2458.7441, 14.9921) && GetPlayerVirtualWorld(playerid) == 0) { if(IsACop(playerid)) SetPlayerPosEx(playerid, 2280.0898, 2458.7939, 38.6871), SetPlayerInterior(playerid, 0); } else if(PlayerToPoint(3.0, playerid, 2280.0898, 2458.7939, 38.6871) && GetPlayerVirtualWorld(playerid) == 0) { if(IsACop(playerid)) SetPlayerPosEx(playerid, 2337.1826, 2458.7441, 14.9921), SetPlayerInterior(playerid, 0); } else if(PlayerToPoint(3.0, playerid, 1630.2462, 1793.0410, 10.8156) && GetPlayerVirtualWorld(playerid) == 0) { if(PlayerInfo[playerid][pMember] == 13) SetPlayerPosEx(playerid, 1606.6693, 1786.6062, 30.4599), SetPlayerInterior(playerid, 0); } else if(PlayerToPoint(3.0, playerid, 1606.6693, 1786.6062, 30.4599) && GetPlayerVirtualWorld(playerid) == 0) { if(PlayerInfo[playerid][pMember] == 13) SetPlayerPosEx(playerid, 1630.2462, 1793.0410, 10.8156), SetPlayerInterior(playerid, 0); } if(IsPlayerInRangeOfPoint(playerid,2,1062.1185, 2077.5059, 10.8352)) { InTraining[playerid] = 0; FactionsSpawns(playerid); new i = GetPVarInt(playerid, "Training"); SetPlayerPosEx(playerid, Training[i][0], Training[i][1], Training[i][2]); DeletePVar(playerid, "Training"); ResetPlayerWeapons(playerid); SCM(playerid, COLOR_YELLOW, "Ai iesit din sala de antrenament."); } if(IsPlayerInRangeOfPoint(playerid,2,1918.2250,-1619.8477,1770.7469)) { if(IsACop(playerid)) ShowPlayerDialog(playerid, DIALOG_TELEPORT, DIALOG_STYLE_LIST, "Teleport", "Enter Yard\nExit jail", "Select", "Cancel"); else { SetPlayerVirtualWorld(playerid, 1339); SetPlayerPosEx(playerid, 1772.0298,-1548.0693,9.9068); SetPlayerInterior(playerid, 0); } } if(IsPlayerInRangeOfPoint(playerid,2,1798.5109,-1578.3337,14.0848) || IsPlayerInRangeOfPoint(playerid,2,1771.7123,-1547.5963,9.9116)) { if(PlayerInfo[playerid][pJailTime] >= 1 || IsACop(playerid)) { SetPlayerVirtualWorld(playerid, 0); SetPlayerPosEx(playerid, 1918.2250,-1619.8477,1770.7469); SetPlayerInterior(playerid, 0); TogglePlayerControllable(playerid, 0); SetTimerEx("UnFreezeStation", 1000, false, "i", playerid); } } if(IsPlayerInRangeOfPoint(playerid,2,2050.3245,1218.4463,547.9710) && IsACop(playerid)) { SetPlayerVirtualWorld(playerid, 0); SetPlayerPosEx(playerid, 1798.5109,-1578.3337,14.0848); SetPlayerInterior(playerid, 0); } else if(IsPlayerInRangeOfPoint(playerid,2,1765.1732,-1569.0253,1742.4930)) SetPlayerPosEx(playerid,1764.3419,-1567.7599,1742.4967); else if(IsPlayerInRangeOfPoint(playerid,2,2166.4771,-1671.7883,15.0743)) { SetPlayerInterior(playerid,5); SetPlayerPosEx(playerid,318.5867,1115.4735,1083.8828); } else if(IsPlayerInRangeOfPoint(playerid,2,2307.2935,-1786.0671,13.5557)) { SetPlayerInterior(playerid,3); SetPlayerPosEx(playerid,1527.229980,-11.574499,1002.097106); } else if(IsPlayerInRangeOfPoint(playerid,2,1095.3142,-1451.3650,22.7504)) { SetPlayerInterior(playerid,14); SetPlayerPosEx(playerid,204.2205,-168.3091,1000.5234); } else if(IsPlayerInRangeOfPoint(playerid,2,2229.3289,-1722.0793,13.5625)) { SetPlayerInterior(playerid,5); SetPlayerPosEx(playerid,772.111999,-3.898649,1000.728820); } else if(IsPlayerInRangeOfPoint(playerid,2,1481.1063,-1771.2532,18.7958)) { SetPlayerInterior(playerid,3); SetPlayerPosEx(playerid,387.7978,173.8582,1008.3828); } else if(PlayerToPoint(2,playerid,627.5488,-571.6494,17.6572)) { SetPlayerPosEx(playerid,238.5496,139.3451,1003.0234); SetPlayerInterior(playerid,3); SetPlayerVirtualWorld(playerid, 0); return 1; } else if(PlayerToPoint(2,playerid,201.5580,1869.3890,13.1406) && IsACop(playerid)) { SetPlayerPosEx(playerid,288.7645,167.7334,1007.1719); SetPlayerInterior(playerid,3); SetPlayerVirtualWorld(playerid, 1); return 1; } else if(IsPlayerInRangeOfPoint(playerid,2,1671.5824,-1329.4281,17.4524)) { if(areape == 1) { SetPlayerInterior(playerid,15); SetPlayerPosEx(playerid,-1423.5153,935.8321,1036.4756); } else return SendClientMessage(playerid,COLOR_WHITE,"Arena de evente este inchisa."); } } if(IsPlayerInRangeOfPoint(playerid,2,1764.3419,-1567.7599,1742.4967)) SetPlayerPosEx(playerid,1765.1732,-1569.0253,1742.4930); else if(IsPlayerInRangeOfPoint(playerid,2,-2027.0515,-104.5211,1035.1719)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,-329.5237, 1536.6777, 76.6322); SetPlayerVirtualWorld(playerid, 0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,-2158.6482,642.3111,1052.3750)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1051.7865,-346.0753,73.9922); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,626.3122,-11.8606,1000.9219) && GetPlayerVirtualWorld(playerid) == 10) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,2448.5317, -2120.4065, 13.5339); SetPlayerVirtualWorld(playerid, 0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,318.5867,1115.4735,1083.8828)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,2166.4771,-1671.7883,15.0743); } else if(IsPlayerInRangeOfPoint(playerid,2,204.2205,-168.3091,1000.5234)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1095.3142,-1451.3650,22.7504); } else if(PlayerToPoint(4.0, playerid,1494.2838,1304.3364,1093.2891) && GetPlayerVirtualWorld(playerid) == 3) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1016.5253,-1557.4689,14.8657); SetPlayerVirtualWorld(playerid, 0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,1702.2629,-1667.8807,20.2188) && GetPlayerVirtualWorld(playerid) == 0) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1754.8519,-1893.8944,13.5568); SetPlayerVirtualWorld(playerid, 0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,1702.2629,-1667.8807,20.2188) && GetPlayerVirtualWorld(playerid) == 1) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,940.4329,1733.4216,8.8516); SetPlayerVirtualWorld(playerid, 0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,1494.2838,1304.3364,1093.2891) && GetPlayerVirtualWorld(playerid) == 7) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1607.3521, 1817.3278, 10.7849); SetPlayerVirtualWorld(playerid, 0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,-204.439987,-26.453998,1002.273437)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1090.7542,-1476.3380,22.7465); } else if(IsPlayerInRangeOfPoint(playerid,2,1527.229980,-11.574499,1002.097106)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,2307.2935,-1786.0671,13.5557); } else if(IsPlayerInRangeOfPoint(playerid,1,304.5868,-141.9874,1004.0625)) SetPlayerPosEx(playerid,305.7950,-141.8203,1004.0547); else if(IsPlayerInRangeOfPoint(playerid,1,298.8386,-141.9191,1004.0547)) SetPlayerPosEx(playerid,300.1631,-141.8074,1004.0625); else if(IsPlayerInRangeOfPoint(playerid,2,1262.1383,-785.3315,1091.9063) && GetPlayerVirtualWorld(playerid) == 3) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid, 1481.10461, -1770.03003, 19.01990); SetPlayerVirtualWorld(playerid,0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,772.111999,-3.898649,1000.728820)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,2229.3289,-1722.0793,13.5625); PlayerInfo[playerid][pLocal] = 255; } else if(PlayerToPoint(5,playerid,387.7978,173.8582,1008.3828)) { SetPlayerPosEx(playerid,1481.1063,-1771.2532,18.7958); SetPlayerInterior(playerid,0); GameTextForPlayer(playerid, string, 1000, 1); } else if(PlayerToPoint(5,playerid,238.5496,139.3451,1003.0234) && GetPlayerVirtualWorld(playerid) == 0) { SetPlayerPosEx(playerid,627.5488,-571.6494,17.6572); SetPlayerInterior(playerid,0); InHQ[playerid] = -1; } else if(PlayerToPoint(5,playerid,288.7645,167.7334,1007.1719) && GetPlayerVirtualWorld(playerid) == 1) { SetPlayerPosEx(playerid,201.5580,1869.3890,13.1406); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); InHQ[playerid] = -1; } else if(IsPlayerInRangeOfPoint(playerid,2,761.412963,1440.191650,1102.703125)) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,387.7978,173.8582,1008.3828); } else if(IsPlayerInRangeOfPoint(playerid,2,2324.2273,-1148.8241,1050.7101) && GetPlayerVirtualWorld(playerid) == 1) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1454.2269,751.6389,11.0234); InHQ[playerid] = -1; SetPlayerVirtualWorld(playerid,0); } else if(IsPlayerInRangeOfPoint(playerid,2,-1423.5153,935.8321,1036.4756)) { if(areape == 1) { SetPlayerInterior(playerid,0); SetPlayerPosEx(playerid,1671.5824,-1329.4281,17.4524); } } } if(GetPlayerVehicleID(playerid) == rentls[1] || GetPlayerVehicleID(playerid) == rentls[2] || GetPlayerVehicleID(playerid) == rentls[3] || GetPlayerVehicleID(playerid) == rentls[4] || GetPlayerVehicleID(playerid) == rentls[5] || GetPlayerVehicleID(playerid) == rentls[6] || GetPlayerVehicleID(playerid) == rentls[7] || GetPlayerVehicleID(playerid) == rentls[8] || GetPlayerVehicleID(playerid) == rentls[9] || GetPlayerVehicleID(playerid) == rentls[10]) { TogglePlayerControllable(playerid, 1); RemovePlayerFromVehicleEx(playerid); } if(GetPlayerVehicleID(playerid) == scooter[1] || GetPlayerVehicleID(playerid) == scooter[2] || GetPlayerVehicleID(playerid) == scooter[3] || GetPlayerVehicleID(playerid) == scooter[4] || GetPlayerVehicleID(playerid) == scooter[5]) { TogglePlayerControllable(playerid, 1); RemovePlayerFromVehicleEx(playerid); } if(NoFuel[playerid] == 1) { RemovePlayerFromVehicleEx(playerid); TogglePlayerControllable(playerid, 1); NoFuel[playerid] = 0; } } Edited November 17, 2022 by NoName145 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.