Jump to content

LoPollo

Members
  • Posts

    353
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by LoPollo

  1. Use the "classic" style: getPedOccupiedVehicleSeat(localPlayer) the other ways i posted return the error as you said, but i don't want to know why right now let me know if this helps function helicopter () if ( isPedInVehicle ( localPlayer ) == false ) then return false end local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if vehicle then if ( policeVehicles[getElementModel ( vehicle )] ) then local maxfuel = tonumber(getElementData(vehicle, "maxfuel")) or 0; local fuels = math.floor(tonumber(getElementData(getElementData(vehicle, "parent"), "fuel"))) or 0; if fuels <=5 then if getPedOccupiedVehicleSeat(localPlayer) == 0 then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.1) setSoundSpeed ( sound, 0.9 ) outputChatBox ( "#FF0000Alarm ! #FFFFFFLow fuel ! Press ' Z ' to stop the alarm.", 255, 255, 255, true ) bindKey ( "Z", "down", stopMySoundB ) addEventHandler ( "onClientVehicleExit", root, stopMySoundV ) killTimer(aMyTimer) end end end end end aMyTimer = setTimer( helicopter, 5000,0)
  2. why do you put vehicle and 0 as arguments? that function does not require arguments. I'm going to test, wait a moment
  3. mmm... try localPlayer:getOccupiedVehicleSeat() instead of localPlayer.vehicleSeat
  4. You make the function end if there's any player at seat 1-2-3, but i guess that's not what you want You are checking if the drivers exists. That's also not what you are looking for. You want to know if the driver is the localPlayer if localPlayer.vehicleSeat == 0 then
  5. post the line where you write the file. you should set the "pos" at the end of the file to 'append' strings on it
  6. LoPollo

    [HELP]Mods

    If you can't remove some client resources to reduce download... well the only thing you can do is compressing... you can do this with TXDs, images, sometime sounds but it's very very rare... maybe dff?? not sure about the last
  7. to check if localPlayer is the driver use getPedOccupiedVehicleSeat. If it does return 0, then localPlayer is the driver
  8. Good! Then good luck with scripting!
  9. Is really needed binding every vehicle to a timer? Did you check the events? Most things can be achieved with events, and most people (me at least) don't like timers A note on what @iPrestege said: also store the created timers on a table so you can manage them. Don't store only vehicles. The best way would be creating a table for every pair of vehicle-timer, so for every vehicle you can easily acces its timer. Or use the vehicle as key/index
  10. That resource, which hex code i posted above, has the goal to detect when an element is created. This way i am only able to detect players, vehicles and peds creations. I could detect projectiles but there's already the client event so i didn't add these. Is there any known way to detect the creation of: 1. Objects 2. Markers 3. Colshapes 4. Pickups
  11. I didn't understand anything
  12. But "blip problem" is very vague, and that's not explained more in the first post. Still @ProMax solved your problem, like his reply if you found value in it (it was so helpful that resolved your issue, so i think there is) and good luck with scripting!
  13. If you are playing the "play" gamemode, and if i remember correctly, you can edit the spawnpoints. If you ALWAYS want to spawn in a location, delete all spawnpoints and add your own spawnpoint with the coords. Hope it helps
  14. Actually i was pretty sure about this, checked in the first resource that came in my mind (i had to download, i'm not at home) exports.dynamic_lighting:setNightSpotRadius(radius) EDIT: that's offtopic anyway Let me know what happens with the executecmd
  15. I can't find any problem in the code honestly... What if you replace the exported function call with an executeCommandHandler that execute the "on" and "off" cmds you have in the first resource? EDIT: exports["gtavradar"].radaron() at line 411: shouldn't it be exports["gtavradar"]:radaron()? Same at lines 415, 111-112
  16. There are spoilers Honestly i can't see any problem.. on start you call the updateUIgui and it uses the export of gtavradar to (dis)activate the radar... and i guess that exported function is the same you use with the command handler Nope i do not have any other idea than delaying by some seconds the calls at line 568-569 and see what happens, just as a test
  17. LoPollo

    help

    take a look to performancebrowser in resourcebrowser (make sure performancebrowser is started) (i'm talking about the web server) PS: next time use a less generic title
  18. LoPollo

    Team TARGET

    Also read that before posting
  19. What should i do now? Exaclty what @loki2143 told you: Also i suggest to read this.
  20. What do you mean exactly? Do you want to use more brands (and thus more vehicle models) on a single GTA SA ID? Cause that's not possible Replacing the model of a vehicle (of an ID) changes ALL vehicles with that ID. The solution would be having more ID but that's a problem too since there's no (as for now) way to increase the available IDs. If you only want to change the texture (and not the model) you can use shaders
  21. I know, but i wanted to know if with multiple copies the problem does not happen.
  22. ui_ClickHandler what function exactly call? radaron and radaroff? i want to understand if the bug happens even with the same functions you use with the commandhandler. I asked to use the timer because if you call these functions... well the only things that change is "when" they are called.
  23. Do not expect me to help you, i'm noob at this. Sorry If i understand with colliding you mean overwriting right? so both first and second, 2 different objects (that's why you get 2 differents "signature"), will have same data But does this happen if you make 2 copy of the .fx shader file? In the code i can't see any cause of overwriting... even the only variable with the same name in the script is tTable which is local.... but i'm a noob at this. I just want to make this as clear as possible.
×
×
  • Create New...