Jump to content

Xwad

Members
  • Posts

    1,089
  • Joined

  • Last visited

Everything posted by Xwad

  1. But the script that you wrote that mount a minigun to a vehicle?
  2. Yeah I know that the "firing" will always shoot but I didnt know the other command for no shooting . But thanks. So I dont need to ise the setweaponammo and the setweapon lstage function?
  3. I can't make it you will laught that is what i made xdd function MountMinigun() local vehicle = getElementPosition(getLocalPlayer()) local weapon = createWeapon("minigun", x, y, z + 1) setWeaponClipAmmo(weapon, 5000) setWeaponState(weapon, "firing") setWeaponProperty(weapon, "fire_rotation", 0, -30, 0) end addEventHandler("onClientResourceStart", resourceRoot, MountMinigun) local randPlayer = getRandomPlayer() -- Get a random player giveWeapon(randPlayer,35,100) -- Give them a rocket launcher with 100 rockets. setWeaponAmmo(randPlayer,35,50) -- Decide we're only going to give them 50 rockets. if not isElement(minigun) then minigun = createWeapon(38) veh = getPedOccupiedVehicle(localPlayer) attachElement(veh, 0, 0, 3) else destroyElement(minigun) end end addCommandHandler("attach", attaching) if isElement(minigun) then fireWeapon(minigun, or something like that) end end addCommandHandler("fire", wepFire)
  4. Xwad

    Vehicle Shop HELP!

    it works! And thanks again for your help!
  5. Xwad

    Vehicle Shop HELP!

    Yeees i want to do that but i wrote the wrong code. I made this but i wrote getPedintoVehicle and thats why it does not work. But Thanks man!
  6. Xwad

    Vehicle Shop HELP!

    no thats not the cood code this is very bad code
  7. Xwad

    Vehicle Shop HELP!

    function scriptCreateFBITruck ( player, command ) local luckyBugger = getRandomPlayer() -- get a random player local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position createVehicle ( 601, x, y, z + 10 ) outputChatBox ( "You got vehicle!", luckyBugger ) addCommandHandler ( "tank",scriptCreateFBITruck
  8. Xwad

    Vehicle Shop HELP!

    no i had a code that gives a car i make it again.
  9. Xwad

    Vehicle Shop HELP!

    Thanks now its working but i dont get the vehicle:(
  10. Xwad

    Vehicle Shop HELP!

    local vehicleMarker = createMarker(-2404.1486816406, -2201.865234375, 32.2,"cylinder",1,255,255,255) function vehicleGUI() vehicleGUI = guiCreateWindow(277, 204, 269, 266, "Vehicle Shop", false) guiWindowSetSizable(vehicleGUI, false) guiSetVisible(vehicleGUI,false) vehicleFBITruck = guiCreateButton(9, 69, 250, 40, "Sd.Kfz.222", false, vehicleGUI) vehicleClose = guiCreateButton(178, 218, 81, 27, "Close", false, vehicleGUI) end addEventHandler("onClientResourceStart",resourceRoot,vehicleGUI) function playerOnMarker() if isElementWithinMarker(localPlayer, vehicleMarker) then guiSetVisible(vehicleGUI, true) showCursor( true ) end end addEventHandler("onClientMarkerHit", vehicleMarker, playerOnMarker) function closeGUI() if source == vehicleClose then guiSetVisible(vehicleGUI,false) showCursor(false) end end addEventHandler("onClientGUIClick",getRootElement(),closeGUI) function vehicleBuy() if source == vehicleFBITruck then triggerServerEvent("onVehicleBought",localPlayer) guiSetVisible(vehicleGUI,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),vehicleBuy)
  11. Xwad

    Vehicle Shop HELP!

    [2015-02-17 17:21:05] ERROR: Client (Xwad) triggered serverside event onVehicleBought, but event is not added serverside
  12. Xwad

    Second Rhino

    ...I have a little clue-.-
  13. Xwad

    Vehicle Shop HELP!

    "Xwad" type="scrip" name="vehicle_shop" />
  14. Xwad

    Vehicle Shop HELP!

    what is the problem? why does it not work?
  15. i dont press anything just my friend connected to my server Version = 1.4.1-release-7076.0.000 Time = Sun Feb 15 12:55:52 2015 Module = E:\Rockstar Games\GTA San Andreas\gta_sa.exe Code = 0xC0000005 Offset = 0x000096AD EAX=1E5D5088 EBX=00AECD34 ECX=1E5D5088 EDX=00863C40 ESI=179C68D0 EDI=00AECD34 EBP=00000000 ESP=0028FB74 EIP=49646550 FLG=00210246 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
  16. Xwad

    Vehicle Shop HELP!

    Its not working:/ ERROR: Client (Xwad) triggered serverside event onVehicleBought, but event is not added serverside
  17. ohh yeah that can be possible. Now i will watch my keyboard when the game crashes.
  18. Xwad

    Vehicle Shop HELP!

    i made the script but it does not work. The server sad : ERROR: Client (Xwad) triggered serverside event onVehicleBought, but event is not added serverside This is the 2 code: C_vehicle.lua local vehicleMarker = createMarker(-2404.1486816406, -2201.865234375, 32.2,"cylinder",1,255,255,255) function vehicleGUI() vehicleGUI = guiCreateWindow(277, 204, 269, 266, "Vehicle Shop", false) guiWindowSetSizable(vehicleGUI, false) vehicleFBITruck = guiCreateButton(9, 69, 250, 40, "Sd.Kfz.222", false, vehicleGUI) vehicleClose = guiCreateButton(178, 218, 81, 27, "Close", false, vehicleGUI) if source == vehicleMarker then guiSetVisible(vehicleGUI, true) showCursor( true ) end end addEventHandler("onClientMarkerHit",getRootElement(),vehicleGUI) function vehicleClose() if source == vehicleClose then guiSetVisible(vehicleGUI,false) showCursor(false) end end addEventHandler("onClientGUIClick",getRootElement(),vehicleClose) function vehicleFBITruck( player ) if source == vehicleFBITruck then triggerServerEvent("onVehicleBought",localPlayer) guiSetVisible(vehicleGUI,false) showCursor( false ) outputChatBox("You have bought Sd.Kfz.222 vehicle.",source) end end addEventHandler("onClientGUIClick",getRootElement(),vehicleFBITruck) s_vehicle function vehicleFBITruck() if ( getPlayerMoney (source) >= 3000 ) then takePlayerMoney(source, 3000) outputChatBox("You have bought Sd.Kfz.222 vehicle.",source) else outputChatBox('You dont have enough money to buy this Vehicle.', source, 255, 0, 0 ) end end) addEvent("onVehicleBought", true) addEventHandler("onVehicleBought", getRootElement(), vehicleFBITruck)
  19. https://plus.google.com/u/0/photos/1033 ... 3625064132
  20. name of the rescources or lua codes?
×
×
  • Create New...