Jump to content

Lloyd Logan

Members
  • Posts

    642
  • Joined

  • Last visited

Everything posted by Lloyd Logan

  1. Yeah becuase googling "50P Skype name" will give you any good result Google searches through millions of results, finding "50p" "Skype" "name" will direct you to possibly millions of results. Chances are you'll find something like an MTASA Forum Post or something that someone has written his Skype name.
  2. for key, value in pairs( markers ) do if ( source == value ) then if ( hitElement == localPlayer ) then if isPedInVehicle ( thePlayer ) then if ( getElementModel ( source ) == 420 ) then destroyElement( markers [ thePlayer ] ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then warpPedIntoVehicle ( skins, vehicle, 2 ) end end That?
  3. Shit! Right, I created a table of markers 1. the i done this marker = { } 2. i then made a random marker from the marker table and now it is in marker = { } 3. the marker is now created in function createmarker 4. but i want to do onMarkerHit of the random marker but the marker i created is in a different function (createmarker)( see 2. and 3.) 5. Now i do onMarkerHit but how do i get the random marker that was created? Your normal one would be castillo = createMarker(blah) addEventHandler("onMarkerHit", castillo --the marker, (thefunctionhere) But my marker was create randomly and is in a table, how do i get what was created and put it into the onMarkerHit?
  4. CLIENT GUIEditor = { button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0, 274, 331, 493, "V.I.P Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) Turismo = guiCreateButton(17, 80, 130, 59, "Give Turismo", false, GUIEditor.window[1]) Hydra = guiCreateButton(173, 80, 132, 57, "Give Hydra", false, GUIEditor.window[1]) Chainsaw = guiCreateButton(17, 176, 127, 58, "Give Chainsaw", false, GUIEditor.window[1]) RPG = guiCreateButton(163, 176, 138, 53, "Give RPG x20", false, GUIEditor.window[1]) EnableGodmode = guiCreateButton(10, 268, 129, 54, "Enable Godmode", false, GUIEditor.window[1]) DisableGodmode = guiCreateButton(162, 268, 126, 49, "Disable Godmode", false, GUIEditor.window[1]) NRG500 = guiCreateButton(12, 348, 124, 53, "Give NRG-500", false, GUIEditor.window[1]) addEventHandler ("onClientGUIClick", NRG500, buyCar, false ) Close = guiCreateButton(162, 352, 121, 49, "Close Panel", false, GUIEditor.window[1]) function buyCar(thePlayer) triggerServerEvent ( "buyVeh", getLocalPlayer(), "greetingHandler" ) end end ) SERVER function greetingHandler ( thePlayer ) createVehicle(522, 1944.60632, -1706.89270, 13.38281)end addEvent( "buyVeh", true ) addEventHandler( "buyVeh", getRootElement(), greetingHandler )
  5. Okay, see that very last function, I wan't that so it is onMarkerHit, is triggered when, (if you look back I created a random marker), that marker is hit, Problem is it is in a table and in a different function
  6. Here is my script, see if you can gather what i mean. local dropoffs = { [1]={ 2060.7685546875, -1941.1181640625, 13.14103603363 }, [2]={ 2114.5068359375, -1611.302734375, 13.167269706726 }, [3]={ 1932.9521484375, -1776.1259765625, 13.16081237793 }, [4]={ 1057.41796875, -1568.4853515625, 13.166387557983 } } local sss = { [1]={ 1965.54296875 , -1883.013671875, 13.160305023193 }, [2]={ 1467.3916015625, -1736.419921875, 13.242918014526 }, [3]={ 2376.1064453125, -1728.4091796875, 13.162055015564 }, [4]={ 1066.5029296875, -1200.86328125, 18.405519485474 } } local pedCus = { [1]={ 9 }, [2]={ 10 }, [3]={ 14 }, [4]={ 15 }, [5]={ 37 } } Team = createTeam("Taxi Driver", 0, 255, 0) busTeams = { [Team] = true } busVehs = { [420] = true } function enterVehicle ( thePlayer, seat, jacked ) -- when a player enters a vehicle if ( busVehs[getElementModel ( source )] ) and ( not busTeams[getPlayerTeam( thePlayer )] ) then -- if the vehicle is one of 4 police cars, and the skin is not a police skin removePedFromVehicle( thePlayer )-- force the player out of the vehicle outputChatBox("Only Taxi Drivers can drive this vehicle!", thePlayer) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) markers = { } blip = { } vehiclees = { } function inVEH(thePlayer) if isPedInVehicle ( thePlayer ) then if ( getElementModel ( source ) == 420 ) then local x, y, z = unpack ( dropoffs [ math.random ( #dropoffs ) ] ) markers [ thePlayer ] = createMarker ( x, y, z, "cylinder", 3.5, 255, 0, 0 ) local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) createPed( skins, x, y, z ) blip [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 41 ) else if ( isElement ( markers [ thePlayer ] ) ) then destroyElement ( markers [ thePlayer ] ) end if ( isElement ( blips [ thePlayer ] ) ) then destroyElement( blips [ thePlayer ] ) end end end end addEventHandler("onVehicleEnter", getRootElement(), inVEH) function warpit ( hitElement ) if ( hitElement == localPlayer ) then if isPedInVehicle ( thePlayer ) then if ( getElementModel ( source ) == 420 ) then destroyElement( markers [ thePlayer ] ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then warpPedIntoVehicle ( skins, vehicle, 2 ) end end end end end addEventHandler ( "onMarkerHit", ********markers[dropoffs]******, warpit ) The last line, is what i mean
  7. Haha! I tried to do that for your own good, . Just in case yu didn't want to keep scrolling and scrolling local pickups = { [1]={ 2060.7685546875, -1941.1181640625, 13.14103603363 }, [2]={ 2114.5068359375, -1611.302734375, 13.167269706726 }, [3]={ 1932.9521484375, -1776.1259765625, 13.16081237793 }, [4]={ 1057.41796875, -1568.4853515625, 13.166387557983 } } local dropoffs = { [1]={ 1965.54296875 , -1883.013671875, 13.160305023193 }, [2]={ 1467.3916015625, -1736.419921875, 13.242918014526 }, [3]={ 2376.1064453125, -1728.4091796875, 13.162055015564 }, [4]={ 1066.5029296875, -1200.86328125, 18.405519485474 } } local pedCus = { [1]={ 9 }, [2]={ 10 }, [3]={ 14 }, [4]={ 15 }, [5]={ 37 } } Team = createTeam("Taxi Driver", 0, 255, 0) busTeams = { [Team] = true } busVehs = { [420] = true } function enterVehicle ( thePlayer, seat, jacked ) -- when a player enters a vehicle if ( busVehs[getElementModel ( source )] ) and ( not busTeams[getPlayerTeam( thePlayer )] ) then -- if the vehicle is one of 4 police cars, and the skin is not a police skin removePedFromVehicle( thePlayer )-- force the player out of the vehicle outputChatBox("Only Taxi Drivers can drive this vehicle!", thePlayer) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) markers = { } blip = { } vehiclees = { } function inVEH(thePlayer) if isPedInVehicle ( thePlayer ) then if ( getElementModel ( source ) == 420 ) then local x, y, z = unpack ( pickups [ math.random ( #pickups ) ] ) markers [ thePlayer ] = createMarker ( x, y, z, "cylinder", 3.5, 255, 0, 0 ) local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) createPed( skins, x, y, z ) blip [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 41 ) else if ( isElement ( markers [ thePlayer ] ) ) then destroyElement ( markers [ thePlayer ] ) end if ( isElement ( blips [ thePlayer ] ) ) then destroyElement( blips [ thePlayer ] ) end end end end addEventHandler("onVehicleEnter", getRootElement(), inVEH) function warpit ( hitElement ) if ( hitElement == localPlayer ) then if isPedInVehicle ( thePlayer ) then if ( getElementModel ( source ) == 420 ) then destroyElement( markers [ thePlayer ] ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then warpPedIntoVehicle ( skins, vehicle, 2 ) end end end end end addEventHandler ( "onMarkerHit", markers, warpit ) It's an extremely simple question I am trying to ask, but I just don't know how to put it.
  8. If you want 50p's skype ask him, If I had his Skype I certainly wouldn't give it away to anyone who asked without his permission!
  9. Thats what i done, addEventHandler("onMarkerHit", markers [ player ], warpit) But it says that it expected element, got table, i want the random marker that was created in the table.. When that is hit, any sense of what I am on about?
  10. What i mean is, "onMarkerHit" then you tell what marker is hit, but i created a table and got a random one, how do i get that random one from a different function?
  11. ..Here is what I've done now, the very last line, how to i get the random marker when it is hit?
  12. Hey, i made a table so i could store markers etc, then delete the table, this works fine, apart from when i get a create a random marker from a list, I donot know how to trigger it in the script? local dropoffs = { [1]={ 2060.7685546875, -1941.1181640625, 13.14103603363 }, [2]={ 2114.5068359375, -1611.302734375, 13.167269706726 }, [3]={ 1932.9521484375, -1776.1259765625, 13.16081237793 }, [4]={ 1057.41796875, -1568.4853515625, 13.166387557983 } } markers = { } function warpit ( hitElement ) if ( hitElement == localPlayer ) then if isPedInVehicle ( thePlayer ) then if ( getElementModel ( source ) == 420 ) then destroyElement( markers [ thePlayer ] ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then warpPedIntoVehicle ( skins, vehicle, 2 ) end end end end end addEventHandler ( "onMarkerHit", markers --this bit, warpit )
  13. Oh, wrong thing sorry, misread that
  14. setTimer(setPedAnimation, 30000, 1, pedyouwanttosettheanimationtoo e.g thePlayer, "GroupName", "AnimationName")
  15. I done this... server markers = { } blip = { } function inVEH(thePlayer) if isPedInVehicle ( thePlayer ) then if ( getElementModel ( source ) == 420 ) then local x, y, z = unpack ( dropoffs [ math.random ( #dropoffs ) ] ) markers [ player ] = createMarker ( x, y, z, "cylinder", 3.5, 255, 0, 0 ) local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) createPed( skins, x, y, z ) blip [ player ] = createBlipAttachedTo ( markers, 41 ) else destroyElement( markers [ player ] ) destroyElement( john [ player ] ) end end end addEventHandler("onVehicleEnter", getRootElement(), inVEH) And it says 48 table index is nil
  16. Lower you in-game settings maybe?
  17. Can I ask what the blips = { } markers = { } mean? I don't understand them or them in the script? Thanks Lloyd
  18. The server is limited to 50?
  19. Hi, How do i make it so that when a player leaves the vehicle an element is destroyed? The preoblem is I have created the marker and blip within another function, and I want them to be there. So i can't use onVehicleExit. Any Ideas? function inVEH() if ( getElementModel ( source ) == 420 ) then local x, y, z = unpack ( dropoffs [ math.random ( #dropoffs ) ] ) callum = createMarker ( x, y, z, "cylinder", 1.5, 255, 0, 0 ) john = createBlipAttachedTo ( callum, 41 ) else destroyElement(callum) destroyElement(john) end end addEventHandler("onVehicleEnter", getRootElement(), inVEH)
  20. I done this, but nothing happens? local dropoffs = { [1]={1802.951171875, -1889.1865234375, 13.185905456543}, [2]={1784.349609375, -1890.255859375, 13.176010131836} } function rMarker() createMarker ( unpack ( dropoffs [ math.random ( #dropoffs ) ] ), "cylinder", 1.5, 255, 0, 0 ) end addCommandHandler("heyy", rMarker)
×
×
  • Create New...