damien111
Members-
Posts
270 -
Joined
-
Last visited
Everything posted by damien111
-
Okay, i completely redid the script tell me if this will work pickedup = false local id = getElementModel ( vehicle ) local VehMarker = createMarker ( 1731.9326171875, 1927.2426757813, 10, "cylinder", 2, 0, 120, 255, 0 ) local theTeam = createTeam ( "Taxi Drivers" ) function startjob ( hitElement, matchingDimension ) local elementType = getElementType ( hitElement ) if ( elementType == "player" ) then setPlayerTeam(source, theTeam) setPlayerSkin(playerSource, 280) local x, y, z = getElementPosition ( hitElement ) local vehicle = createVehicle ( 597, x, y, z ) if id == 420 then function f() pickup = createMarker(x, y, z, "cylinder", 2, 250, 250, 250) pickupblip = createBlipAttachedTo(43, pickup) dropoff = createMarker(a, b, c, "cylinder", 2, 250, 250, 250) dropoffblip = createBlipAttachedTo(44, pickup) end end end end addEventHandler ( "onMarkerHit", VehMarker, startjob ) function checkifintaxi ( ) end --Tabel Of Cooridnates of Pickups local pickups = { { 1012.4227905273, 2017.2518319547, 9 }, { 987.3311767582, 2288.8173828125, 9 }, { 1614,3260498047, 2085.966796875, 9 }, { 2099.5419921875, 2026.4774169922, 9 }, { 2362.6103515625, 2005.8046875, 9 }, { 2826.5612792969, 1980.7646484375, 9 }, { 2903.5383300781, 2403.18017527813, 9 }, { 2099.5419921875, 2026.4774169922, 9 } } local dropoffs = { { 2290.7290039063, 2417.2971191406, 9 }, { 2211.8864746094, 1839.1610107422, 9 }, { 2155.9345703125, 977.22955322266, 9 }, { 1863.4801025391, 654.181640625, 9 }, { 1688.4946289063, 994.02716064453, 9 }, { 1398.4516601563, 1052.9704589844, 9 }, { 1039.3806152344, 1138.0095214844, 9 }, { 1112.4752197266, 1376.9332275391, 9 } } x, y, z = getRandomCoordinatesDropOff ( ) a, b, c = getRandomCoordinatesPickup ( ) function getRandomCoordinatesPickup ( ) return unpack ( pickups [ math.random ( #pickups ) ] ) end function getRandomCoordinatesDropOff ( ) return unpack ( dropoffs [ math.random ( #dropoffs ) ] ) end function pickingup ( hitElement, matchingDimension ) local elementType = getElementType ( hitElement ) if ( elementType == "player" ) then if id == 420 then local pickedup = true end end function dropoff ( hitElement, matchingDimension ) local elementType = getElementType ( hitElement ) if ( elementType == "player" ) then givePlayerMoney ( source, 1000 ) destroyElement (pickup) destroyElement (dropoff) destroyElement (pickupblip) destroyElement (dropoffblip) function g() pickup = createMarker(x, y, z, "cylinder", 2, 0, 250, 250, 250) pickupblip = createBlipAttachedTo(43, pickup) dropoff = createMarker(a, b, c, "cylinder", 2, 0, 250, 250, 250) dropoffblip = createBlipAttachedTo(44, pickup) end end end end addEventHandler ( "onMarkerHit", pickup, pickingup ) addEventHandler ( "onMarkerHit", dropoff, dropoff )
-
On my server iwas bout tostart mapping and I realized after I turned on the editor resource that the spawninbg tools are not in the lower left cormorant and I cant find them. Can someone please help me quick. Ibposted here cause I wasn't sure where to post.
-
That did noot work! Please SOMEONE HELP QUICK! :C
-
What?
-
My servers mapping tools are bugged or something. when i started the editor source it loads and everything is normal but one thing. the tools in the lower left hand cornor are not there. I need help with this IMMEDIATLY. Thankyou all
-
I wont answer right away as i will be back in a few hours but. Here is my code for a taxi script. local VehMarker1 = createMarker ( 297.669372255859, 1938.08776855859, 18, "cylinder", 2, 0, 0, 255, 153) function startJob ( )( hitElement, matchingDimension ) local elementType = getElementType ( hitElement ) if ( elementType == "player" ) then setPlayerTeam ( source, theTeam) local theTeam = createTeam ( "Taxi Drivers" ) setPlayerSkin( source, 210) local x, y, z = getElementPosition ( hitElement ) local vehicle = createVehicle ( 597, x + 5, y, z ) function picfunction ( ) functions [ math.random ( #functions ) ] ( ) end addEventHandler ( "onMarkerHit", VehMarker1, spawnveh ) end function Stop1 ( ) local missionmarker = createMarker ( 1112.4752197266, 1376.9332275391, 9, "cylinder", 2, 0, 0, 255, 153 ) local missionblip = createBlip ( 1112.4752197266, 1376.9332275391, 9, 41, 0, 0, 0, 255 ) function startstop1 ( hitElement, matchingDimension ) local elementType = getElementType ( hitElement ) if ( elementType == "player" ) then local pteam = getPlayerTeam ( hitElement ) local pTeamName = ( pteam and getTeamName ( pteam ) or "" ) if ( pTeamName == "Taxi Driver" ) then destroyElement (missionblip) destroyElement (missionmarker) local missionmarker2 = createMarker ( 2099.5419921875, 2026.4774169922, 9, "cylinder", 2, 0, 0, 255, 153 ) local missionblip2 = createBlip ( 2099.5419921875, 2026.4774169922, 9, 41, 0, 0, 0, 255 ) addEventHandler ( "onMarkerHit", missionmarker, Stop1 ) addEventHandler ( "onMarkerHit", missionmarker2, getmoney ) if ( elementType == "player" ) then function getmoney ( ) local pteam = getPlayerTeam ( hitElement ) local pTeamName = ( pteam and getTeamName ( pteam ) or "" ) if ( pTeamName == "Taxi Driver" ) then givePlayerMoney (source, 1000) destroyElement (missionblip2) destroyElement (missionmarker2) end function picfunction ( ) functions [ math.random ( #functions ) ] ( ) end end end end end end end end function Stop2 ( ) local missionmarker3 = createMarker ( 1012.4227905273, 2017.2518319547, 9, "cylinder", 2, 0, 0, 255, 153 ) local missionblip3 = createBlip ( 1012.4227905273, 2017.2518319547, 9 , 41, 0, 0, 0, 255 ) function startstop1 ( hitElement, matchingDimension ) local elementType = getElementType ( hitElement ) if ( elementType == "player" ) then local pteam = getPlayerTeam ( hitElement ) local pTeamName = ( pteam and getTeamName ( pteam ) or "" ) if ( pTeamName == "Taxi Driver" ) then destroyElement (missionblip3) destroyElement (missionmarker3) local missionmarker4 = createMarker ( 2903.5383300781, 2403.18017527813, 9, "cylinder", 2, 0, 0, 255, 153 ) local missionblip4 = createBlip ( 2903.5383300781, 2403.18017527813, 9, 41, 0, 0, 0, 255 ) addEventHandler ( "onMarkerHit", missionmarker, Stop1 ) addEventHandler ( "onMarkerHit", missionmarker2, getmoney ) if ( elementType == "player" ) then function getmoney ( ) local pteam = getPlayerTeam ( hitElement ) local pTeamName = ( pteam and getTeamName ( pteam ) or "" ) if ( pTeamName == "Taxi Driver" ) then givePlayerMoney (source, 1000) destroyElement (missionblip4) destroyElement (missionmarker4) end function picfunction ( ) functions [ math.random ( #functions ) ] ( ) end end end end end end end end end functions = { Stop1, Stop2 } end It doesnt spawn the marker. and also. i want to know if that will work correctly. i will be adding several more functions and probally add a ped spawner part in there to. then it warps ped into the car. but anyways. please tell me if i did this correctly and also tell me why it wont spawn the marker. Heres the Meta To: <meta> <info author="damien" version="1.1.1" type="script" name="Test" /> <script src="Script.lua" type="server" /> </meta>
-
Oh my God thankyou!!
-
I saw that, it is a lil much, but I guess it will do, I was wandering also if there was a way to do a table with functions. And have them randomly chosen?if so explain please
-
So I been using the createPed but it does not seem to work. I want to know how to do this and how to set the weapons that they will fire at certain team only, also he doesny need to move, just spawn, get a m4 and open fire upon the team. Thanks. Also. SolidSnake check that post from yesterday, thanks.
-
Thankyou so much, I will script it tomorrow. You are the only reason I didn't give up on scripting. I would've gave up when I got stuck the second time probally . Ps. Love SAUR
-
Then how do I make randomly choose one. Like show me what you mean. Also how do I detect if a player is in certain car? Is it like getplayervehicle. Thx
-
Next time more people can help you if you copy and paste your code like this [L u a] Your code [/l u a] with no spaces
-
I want my script top randomly pick 1 of 10 or 20 functions to execute. This is for taxi script. The script will first detect if he is in a taxi. The player will randomly be given a marker to go to with a per near it. When he enters the marker the ped is warped to the car,he has to take it to another marker. Then the random chooser function is executed again and so forth. My only problem so far is with this random choosing thing. Can someone point me in the right direction. Thanks Written with my kindle fire sorry bout any typos!!!!
-
nvm i fixed it
-
so has anyone figured out what the prob was? i need to know why it isnt making the marker ill try making it serverside
-
Agh! Still, no marker.
-
i fixed up the code but still no marker is being created: local VehMarker = createMarker ( 2158, 2449, 11, "cylinder", 2, 0, 0, 255, 153 ) function spawnveh ( hitElement, matchingDimension ) local elementType = getElementType ( hitElement ) if ( elementType == "player" ) then local pteam = getPlayerTeam ( hitElement ) local pTeamName = ( pteam and getTeamName ( pteam ) or "" ) if ( pTeamName = "Police" ) then local x, y, z = getElementPosition ( hitElement ) local vehicle = createVehicle ( 597, x, y, z ) end end end addEventHandler ( "onMarkerHit", VehMarker, spawnveh )
-
what would that have to do with the marker being created
-
Its not making the marker...
-
I have been and will keep depending on this forum and be posting a lot. Hope that you can help again cause your server is so amazing!!
-
Thanks so much. & i did that from scratch, that's why it had so many errors
-
I am a few days into scripting! I need help with this, i know its simple but im not sure why this isnt working. it doesnt even spawn a marker. heres the code. i only have a client side file. local VehMarker createMarker (2158, 2449, 11, "Cylinder", 2, 0, 0, 255, 153) function spawnveh(hitElement, matchingDimension) pteam = getPlayerTeam (source) if pteam = "Police" then local elementType = getElementType( hitElement) local x, y, z = getElementPosition(thePlayer) local vehicle = createVehicle(tonumber(597), x, y, z) end end addEventHandler ( "onMarkerHit", VehMarker, spawnveh )
-
Btw, i tryed using legal system, but it did not work
-
Thanks for the input guys!
