Jump to content

AlexWo

Members
  • Content Count

    67
  • Joined

  • Last visited

Community Reputation

0 Neutral

About AlexWo

  • Rank
    Snitch
  • Birthday 03/12/1996

Details

  • Location
    Germany
  1. Hello I have a problem in my script... I have 2 Markers and if I enter the second marker, the function of my first marker appears... At the moment my script is only Client Side: objecttosteal = createObject ( 2914, 2000, 1567, 14.5, 0, 0, 0 ) createBlipAttachedTo ( objecttosteal, 53 ) local attachedmarker = createMarker ( 2000, 1567, 13, "cylinder", 1.5, 0, 255, 255, 150 ) attachElements ( attachedmarker, objecttosteal, 0, 0, 0 ) armyblip = createBlip(2294, 2459, 10, 44) function chooseteam () local x,y = guiGetScreenSize() TeamWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4
  2. Hello, I got a problem with an "If" I want that if an player enters a marker, his Skin will get checked and if his skin is 287 (Army skin) an object will get attached to him. Client Side with the Problem: function attachobjectterror() attachElements ( objecttosteal, localPlayer, 0.5, 0, -0.5 ) setMarkerColor ( attachedmarker, 0, 255, 0, 0 ) end function attachobjectarmy() attachElements ( objecttosteal, localPlayer, 0.5, 0, -0.5 ) setMarkerColor ( attachedmarker, 0, 255, 0, 0 ) end function getModelID(hitElement) if getElementType(hitElement) == "player"
  3. Hi I made some Vehicle Spawnmakers and now I have the problem that if a player is in a vehicle and hits the marker he get the VehicleSelect GUI. I don't want that... I tried already with some If clauses but it didn't worked. This is the part of my Client script where I placed the IF: function PoliceGUI (hitPlayer, matchingDimension ) if isPedInVehicle ( hitPlayer) then outputChatBox ( getPlayerName(hitPlayer) .. ", you have to leave your vehicle!", 255, 255, 0 ) else --Message that you enered the Marker outputChatBox
  4. It works! Thank you very much. What does exactly that addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for _, marker in ipairs ( markers ) do addEventHandler ( "onClientMarkerHit", marker, PoliceGUI ) end end ) do?
  5. Hey, I got in my script 2 different marker. One of them opens a Job-GUI and the other one will open a Vehiclespawn-GUI. Now if I enter the second marker it opens the Job-GUI. I use as the event handler addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) "getRootElement". I think thats the problem but if I chage it and start it no GUI opens. Help would be great This is my whole clientside-script: markers = { createMarker( -1620, 685, 6, "cylinder", 1.5, 0, 0, 255, 100), createMarker( 2242, 2450, 9.75, "cylinder", 1.5 , 0, 0, 255, 100),
  6. Thanks for the very fast answer But what exactly will happen if I make it not "local"?
  7. Hey I have a problem that my gui don't disapear when i click on the exit button Script(client): LSPolice = createMarker( 1554, -1675, 15.28, "cylinder", 1.5, 0, 0, 255) function MarkerHit ( hitPlayer, matchingDimension ) outputChatBox ( getPlayerName(hitPlayer) .. ", you entered the Police-Job Marker in LS", 255, 255, 0 ) local policeWindow = guiCreateWindow ( 0.25, 0.25, 0.4, 0.4, "Policejob LS", true ) local policePanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, policeWindow ) -- create a tab panel which fills the whole window local policeMap = guiCreateT
  8. Well if you know how to script you could make your own Gamemode.
  9. Yay it works now as I wanted it to work Thank you very much
  10. Ok it works.... I changed the script to local locations = { { 1876, -1377, 13 }, { 1921, -1792, 13 }, { 2000, -2041, 13 } } function spawnVan () local x, y, z = unpack ( locations [ math.random ( 1, #locations ) ] ) misteryvan = createVehicle (482, x, y, z ) blip = createBlipAttachedTo ( misteryvan, 37 ) end addEventHandler ( "onResourceStart", getRootElement(), spawnVan ) function givestuff (thePlayer) if isPedInVehicle ( thePlayer ) then destroyElement ( misteryvan ) end end addEventHandler ( "onPlayerVehicleEnter", root, givestuff )
  11. Hello, I played once on a Server and there was a script called "Mistery Van". The script spawns a vehicle on Random Locations. If you enter the Van it dissapears and you get some money, armor and so on... function spawnVan () misteryvan = createVehicle (482, x,y,z ) end addEventHandler ( "onResourceStart", getRootElement(), spawnVan ) function givestuff (thePlayer) givePlayerMoney(thePlayer, 5000) setPedArmor( thePlayer, 50) setPedHealth( thePlayer, 100) end addEventHandler ( "onPlayerVehicleEnter", root, givestuff ) Thats the script I got for now. I don't know ho
  12. Wow, the scripts look amazing Thank you for the Link
×
×
  • Create New...