Jump to content

jingzhi

Members
  • Posts

    288
  • Joined

  • Last visited

Everything posted by jingzhi

  1. Thank you very much, now it works but I want to learn whats the usage of "if (veh) then", it won't work without it?
  2. Still have the same problem, here is the debugscript http://postimg.org/image/yaztoi3a3/
  3. Hey guys! So I had this problem making my repairing marker. I'm a noobie so please don't go hard on me local marker = createMarker(2064.46924,-1831.39221,13, "cylinder",2,255,255,0) addEventHandler("onMarkerHit",marker, function(thePlayer) local veh = getPedOccupiedVehicle (thePlayer) local fixVehicle(veh) end end) Whats the problem in this script?
  4. Debug body wont show up any message because script didn't had any 'bug'. Yea thats what i gave you at very first reply on mine here, but then again you mis-explained it or i misunderstood it, anyways, here is what you want: local marker = createMarker(1514.20679,-1657.22742,12.5,"cylinder",1.2,255,255,255) function MarkerHit(plr) if getElementType(plr) == "player" then if (isPedInVehicle(plr)) then return end local x, y, z = getElementPosition(plr) local veh = createVehicle(509, x, y, z) warpPedIntoVehicle(plr, veh) end end addEventHandler("onMarkerHit", marker, MarkerHit) \ This wont spawn vehicle if you are already in a vehicle. Thanks a lot I have tried it, now it works
  5. Debug script 3 doesn't show any thing, but it just doesn't work unless I'm in a vehicle
  6. The original problem is, when I'm on foot, it won't put me on a bike, it only will if I'm in a vehicle Change Line#5 with this: if (not isPedInVehicle(plr)) then return end But I want the function to be : It put me on a bike if I'm on foot, but it won't if I'm in a vehicle. I'm not sure if I have explained it clear enough, anyways, I will try those as soon as I get home
  7. The original problem is, when I'm on foot, it won't put me on a bike, it only will if I'm in a vehicle
  8. Thank you very much, but will it also fix the problem that it won't put me on a bike when I'm on foot? I will your scripts as soon as I get home.
  9. I Will try later when I get home, but I wonder how could a timer help
  10. I have just tested it and it got the same problem with the original
  11. Thank you! and can you tell me the reason you change "Vehicle" to "veh"?
  12. its server side, and by the way, i found out its only working while you are in a vehicle, then you will be put on a bike
  13. I was trying to make a script for when player go into the marker and it spawns a bike and put the player on the bike at the same time. So i made this script but its not working, when i step into marker, nothing happens, debugscript mode 3 shows nothing. Here is my script : marker = createMarker(1514.20679,-1657.22742,12.5,"cylinder",1,255,255,255) addEventHandler("onMarkerHit",marker, function(thePlayer) if getElementType(thePlayer) =="player" then local Vehicle = createVehicle (509,1514.20679,-1657.22742,12.5) warpPedIntoVehicle (thePlayer, Vehicle) end end)
×
×
  • Create New...