mars
Members-
Posts
29 -
Joined
-
Last visited
Everything posted by mars
-
it is posible, you can change the outlook from vehicle's to another model. like a infernus to a bmw.
-
hey guys, i was trying to make a bus job right now i'm kinda addicted to scripting but i made this in like, idk, 1 min? but it doesn't work function startbus (thePlayer, command ) veh = getPedOccupiedVehicle ( thePlayer ) if (veh == 431) then my = createMarker ( -2196, 324, 34, "cylinder", 3, 255, 255, 0, 70 ) setElementVisibleTo ( my, getRootElement(), true ) setElementVisibleTo ( my, thePlayer, true ) outputChatBox ( "#FF0000[bus Companie] #00FF00get to the first station, dont get too late!", thePlayer, 255, 255, 255, true ) end end addCommandHandler("startbus", startbus) addEventHandler("startbus", getRootElement(), startbus) if i enter a vehicle, (bus) and i type /startbus , it should make a marker and say [bus Companie] go to the first station, dont get to late! but 1, the marker doesn't show up ^^'' and you can guess, 2. he doesn't say crap
-
you can scream what ever you want but i'm a newb in lua and i do like it! now i got this: the problem is, it wont get deleted if the health of the car is less than 350.
-
you should change outputConsol to outputChatBox. than they will be fixed.
-
hey guys, ive been scripting a mission, but the vehicle doesn't get deleted with this. dylan2en helped me to make it alitle further, but now the vehicle wont get deleted. script: marky = createMarker ( -2642.5, 1375, 6, "cylinder", 1.5, 255, 255, 0, 30 ) function mission ( hitPlayer ) if (source == marky) then my = createMarker ( -1647, 1219, 6, "cylinder" , 4, 255, 255, 0, 30 ) setElementVisibleTo ( my, hitPlayer , true ) local MissionVehicle = createVehicle ( 401, -2639, 1371, 8 ) warpPedIntoVehicle ( hitPlayer , MissionVehicle ) blip = createBlip ( -1647, 1219, 4, 52, 2, 255, 0, 0, 255, 0, 99999.0, getRootElement() ) setElementVisibleTo ( blip, hitPlayer, true ) outputChatBox ( "#FF0000[Auto Seller Bob] #00FF00bring this car to otto's dont get to late.", getRootElement(), 255, 255, 255, true ) end end addEventHandler("onMarkerHit" , getRootElement(), mission) function Reward( hitPlayer ) if (source == my) then removePedFromVehicle( hitPlayer) destroyElement( MissionVehicle ) destroyElement( blip ) destroyElement( my ) givePlayerMoney(hitPlayer, 100000) outputChatBox ( "#00FF00WELL done, take this as a reward", getRootElement(), 255, 255, 255, true ) end end addEventHandler ("onMarkerHit" , getRootElement(), Reward)
-
i'm not very good at scripting, can you maybe explain "attach the function just to this one marker, not to all elements (getRootElement())" alitle bigger? thank you
-
haha i know about the get nick, i removed. i mixed 2 scripts, but can you explain abit more? i got this right now marky = createMarker ( -2642.5, 1375, 6, "cylinder", 1.5, 255, 255, 0, 30 ) function mission ( hitPlayer ) my = createMarker ( -1647, 1219, 6, "cylinder" , 4, 255, 255, 0, 30 ) --setElementVisibleTo ( myMarker, getRootElement ( ), false ) --setElementVisibleTo ( myMarker, hitPlayer , true ) local MissionVehicle = createVehicle ( 401, -2639, 1371, 8 ) warpPedIntoVehicle ( hitPlayer , MissionVehicle ) blip = createBlip ( -1647, 1219, 4, 52, 2, 255, 0, 0, 255, 0, 99999.0, getRootElement() ) --setElementVisibleTo ( blip, hitPlayer, true ) end addEventHandler ("onMarkerHit" , getRootElement(), mission)
-
hey all, i wanted to make missions but its weird, i got the spawn, of the car. u get spawned in it. a blip is getting created, and a marker too. but when you hit the other marker, the server + your mta crashed and it doesn't give me a error is something, this is how far i am atm: mission = createMarker ( -2642.5, 1375, 6, "cylinder", 1.5, 255, 255, 0, 30 ) function mission ( hitPlayer ) getNickFromPlayer = ( hitPlayer ) if ( hitPlayer ) then myMarker = createMarker ( -1647, 1219, 6, "cylinder" , 4, 255, 255, 0, 30 ) --setElementVisibleTo ( myMarker, getRootElement ( ), false ) --setElementVisibleTo ( myMarker, hitPlayer , true ) local MissionVehicle = createVehicle ( 401, -2639, 1371, 8 ) warpPedIntoVehicle ( hitPlayer , MissionVehicle ) blip = createBlip ( -1647, 1219, 4, 52, 2, 255, 0, 0, 255, 0, 99999.0, getRootElement() ) --setElementVisibleTo ( blip, hitPlayer, true ) end end addEventHandler ("onMarkerHit" , getRootElement(), mission)
-
hey guys, i wanted to make a simple lock script, but i failed. it said setVehicleOverrideLock is a nil value. what is it suppose to be? hole script: function doToggleLock ( source, beep ) local theVehicle if ( getElementType(source) == "vehicle" ) then theVehicle = source end if ( getElementType(source) == "player" ) then theVehicle = getElementData ( source, "cl_ownedvehicle" ) end if ( theVehicle ) then if ( getVehicleOverrideLock ( theVehicle ) ~= 2 ) then setVehicleOverrideLock ( theVehicle, 2 ) end else setVehicleOverrideLock ( theVehicle, 1 ) end end function cl_PlayerJoin ( ) bindKey ( source, "l", "down", doToggleLock ) end o and my bind key aint working
-
hmm can any1 check if this is allright? the onPlayerJoin, i think its wrong. function positie ( source ) local acc=getPlayerAccount(source); setAccountData(acc,"posX",x); setAccountData(acc,"posY",y); setAccountData(acc,"posZ",z); end addEventHandler ("onPlayerJoin",getRootElement(),positie) thx.
-
hey guys ive got a litle question, i'm trying to make a position saver. but its kinda hard. can some1 give me a start please?^^, or something like a site where is standing how very junior in scripting ^^'' thx
-
haha its your own guide, and yes i use it. its kinda good as start
-
hey guys, i make alot of topic's i know but i think, i wont need alot of topic's anymore ^^ just. i got this: but when i change my skin ingame to 50 and i type /repair i get this warring and it doesn't repair the car. can some1 maybe help me?^^''
-
woow useless post":D"
-
not needed anymore learning to script my self.
-
theDoor = createObject ( 10184, -1631.48, 688.37, 8.711, 0, 0, 270 ) marker = createMarker (-1631.8128662109, 687.58038330078, 6.1624999046326,18, "cylinder", 0 , 0 , 0 , 0) function openCopDoor ( hitPlayer, matchingDimension ) theHitSkin = getPedSkin ( hitPlayer ) if (theHitSkin == 280) or (theHitSkin == 281) or (theHitSkin == 282) or (theHitSkin == 283) or (theHitSkin == 284) or (theHitSkin == 285) then moveObject (theDoor, 7000, -1631.48, 688.37, 13.08 ) end end addEventHandler ("onMarkerHit", getRootElement(), openCopDoor) function closeCopDoor (leftPlayer, matchingDimension ) theLeftSkin = getPedSkin ( leftPlayer ) if (theLeftSkin == 280) or (theLeftSkin == 281) or (theLeftSkin == 282) or (theLeftSkin == 283) or (theLeftSkin == 284) or (theLeftSkin == 285) then moveObject (theDoor, 7000, -1631.48, 688.37, 8.711) end end addEventHandler ("onMarkerLeave", getRootElement(), closeCopDoor) theDDoor = createObject ( 1495, -1618.619140625, 682.3955078125, 6.137619972229, 0, 0, 272.38952636719 ) marker = createMarker (-1618.9979779297, 681.52160644531, 5.1901206970215, 2, "cylinder", 0 , 0 , 0 , 0) function openDDoor ( hitPlayer, matchingDimension ) theHitSkin = getPedSkin ( hitPlayer ) if (theHitSkin == 280) or (theHitSkin == 281) or (theHitSkin == 282) or (theHitSkin == 283) or (theHitSkin == 284) or (theHitSkin == 285) then moveObject (theDDoor, 7000, -1618.619140625, 682.3955078125, 10.137619972229 ) end end addEventHandler ("onMarkerHit", getRootElement(), openDDoor) function closeDDoor (leftPlayer, matchingDimension ) theLeftSkin = getPedSkin ( leftPlayer ) if (theLeftSkin == 280) or (theLeftSkin == 281) or (theLeftSkin == 282) or (theLeftSkin == 283) or (theLeftSkin == 284) or (theLeftSkin == 285) then moveObject (theDDoor, 7000, -1618.619140625, 682.3955078125, 6.137619972229) end end addEventHandler ("onMarkerLeave", getRootElement(), closeDDoor) the doors open with 1 marker? each marker opens the 2 doors 0.0, i'm new in scripting and trhowing all the bad words to my screen bec it aint working ¬¬''
-
srry for all those post but i'm getting ccrazy of this 1. i'm trying alot but nothing works. can some1 make this work for me. function CreateBlip(player) local blip=createBlipAttachedTo(player, 52, 2, 255, 0, 0, 255, 0, 10000, player ) setElementData( player,"omgblip",blip ); outputChatBox("Blip attached to you",player) for i, plr in pairs( getElementsByType( "player" ) ) do skin = getPedSkin( plr ) if skin == 211 then setElementVisibleTo( blip, player, true ) else end end end addCommandHandler ("taxi",CreateBlip) function DestroyBlip(player) local blip = getElementData( player, "omgblip" ); if ( blip ) then destroyElement( blip ) outputChatBox("fare is being helped",player) end end addCommandHandler ("canceltaxi",DestroyBlip) very much thx.
-
o problem solved. thx for your time anyway. i had a spawn in my base that sets your skin to 0
-
account.xml changes the skin to 0.
-
no not even 1 error
-
hey guys, can some1 tell me whats wrong with this: function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getPedSkin ( source ) setAccountData ( playeraccount, "skin", playerskin ) end end function onPlayerLogin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getAccountData ( playeraccount, "skin" ) if ( playerskin ) then setPedSkin ( source, playerskin ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) thx.