-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
welke afmetingen?
-
@TA-PL I have this function testPed() ..... if ( isPedDead ( shopKeeper ) ) then triggerClientEvent (source, "testMessage1", root) testMarker = createMarker(-27,-91.6, 1002.5, 'cylinder', 1.5, 0, 100, 255, 255) setElementInterior (robMarker, 18) end end function testHit ( thePlayer, matchingDimension ) local elementType = getElementType( thePlayer ) if (elementType) then triggerClientEvent (source, "testMessage2", root) end end addEventHandler( "onMarkerHit", testMarker, testHit ) I want to get testMarker out of testPed and trigger testHit but it doesn't work... The event handler doesn't see testMarker
-
function testHit ( thePlayer, matchingDimension ) local elementType = getElementType( thePlayer ) if (elementType) then triggerClientEvent (source, "testMessage", root) end end addEventHandler( "onMarkerHit", testMarker, testHit ) How can I get testMarker, it's in another function
-
You can attack it and he attacks back, but if he dies he needs to respawn after a while. They are like bodyguards
-
Thx, can I add a setTimer and then respawn the ped? otherwise I need to restart script for a new ped
-
Works now, had a small mistake
-
No errors, no debug but now he doesn't take weapon or punches he just does nothing
-
Error when aiming [12:47:52] WARNING: test\server.lua:31: Bad argument @ 'getElementType' [Exp ected element at argument 1, got boolean] if getElementType(target) == "ped" and target == testPed then He doesn't take his weapon and he punches once with his fist
-
Thx works, Now i'm trying to use some Pedistrian functions. I want to do that when a player aims at pedistrian test, ped test gets a weapon and shoots at the player. This is what I got; --server function testAttack () target = getPedTarget ( testKeeper ) if ( target ) then giveWeapon (testPed, 31, 100) triggerClientEvent (thePlayer, "testShoot", root) end end addEventHandler ( "onPlayerDamage", root, testAttack ) --client function testShoot () setPedControlState(testPed, fire, true) end addEvent( "testShoot", true ) addEventHandler( "testShoot", root, testShoot)
-
Hi, My entranceMarker works but exit doesn't; exitMarker = createMarker(-30.9,-91.6, 1002.5, 'cylinder', 1.0, 0, 100, 255, 255) setElementInterior (exitMarker, 18) entranceMarker = createMarker(-2442.6001, 754.70001, 34.1, 'cylinder', 2.0, 0, 100, 255, 255) function enterHit( thePlayer, matchingDimension ) local elementType = getElementType( thePlayer ) if (elementType) then setElementInterior (thePlayer, 18) setElementPosition (thePlayer, -31, -90.2, 1003.5) end end function exitHit ( thePlayer, matchingDimension ) local elementType = getElementType( thePlayer ) if (elementType) then setElementInterior (thePlayer, 0) setElementPosition (thePlayer, -2442.3999, 751.59998, 35.2) end end addEventHandler( "onMarkerHit", exitMarker, exitHit ) addEventHandler( "onMarkerHit", entranceMarker, enterHit )
-
remove this please, it's mine but i needed to update instead of re-upload: https://community.multitheftauto.com/index.php?p= ... ls&id=8410 DONE
-
• Fixed some bugs • Added Col zone + dxDraw Message
-
triggerClientEvent("statsup22",k)iller needs to be; triggerClientEvent("statsup22",killer)
-
IIYAMA found some bugs, Updating now!
-
Great idea BUT i don't have any idea how to connect a Lua with an XML File. (exept of Meta)
-
Hey Guys So I decided to rewrite this entire post because it was lacking a bit of information and formatting. Information First, the new version (4.1) requires my new script called simple-notifications which I made specific for this script to have some notifications. Inside the resource folder you will find a file called data.xml this file contains all the information on the garages/car dealerships. Youtube Preview https://www.youtube.com/watch?v=N_AaE4ZSfHc XML Structure <data> <garage x="-2068.6442871094" y="49.485717773438" z="28" width="51.8923339844" depth="48.108177185058" height="10"> <blip x="-2038.0665283203" y="82.775970458984" z="42" icon="55" size="2" r="255" g="0" b="0" a="255" ordering="0" distance="200" /> <spawnpoints> <spawnpoint name="spawn1" x="-2049.8791503906" y="56.531303405762" z="27.985414505005" rx="0" ry="0" rz="270" /> </spawnpoints> <vehicles> <vehicle name="Alpha" model="602" x="-2022.8159179688" y="84.669151306152" z="28" rx="0" ry="0" rz="270" price="1000" spawnpoint="spawn1" /> </vehicles> </garage> </data> This explanation will require a basic understanding of XML. - garage: Cuboid zone that handles all cars inside x: The X position of the garage's western side y: The Y position of the garage's southern side z: The Z position of the garage's lowest side width: The garage's width depth: The garage's depth height: The garage's height - blip: this should be self explanatory (createBlip) - spawnpoints: list of spawnpoints with name, minimum 1 required - spawnpoint: spawnpoint information name: required name can be anything x, y, z: Position coordinates rx, ry, rz: Rotation coordinates - vehicles: list of all the vehicles in the store - vehicle: vehicle information name: Display name for the UI elements model: modelID, x, y, z: Position coordinates rx, ry, rz: Rotation coordinates price: price spawnpoint: name of the spawnpoint (can be left out, first spawnpoint in list will be used) Requirements • simple-notifications (separate script by me) • min client version of 1.5.6-9.14370 Download https://community.multitheftauto.com/index.php?p=resources&s=details&id=8406
-
Again it works, I like you
-
Hello, How does createColRectangle work? I want to create a ColRectangle from 2 points; -1942.0435791016, 253.55065917969, 35.46875 -1964.8684082031, 308.1748046875, 35.473926544189 But how? Thanks in advance!
-
Is there a possibility to change the alpha of a dxDraw? if yes then how?
-
Yes! I works fine i've changed time to 10 secs can I add that after 10secs alpha changes from 255 to 0 (fade out)?
-
Going to test it but you seem pretty trusted with dxDraw, so Thanks in advance
-
Hello function buyMsg (player) if showRoomVehicles[source] then setVehicleLocked ( source, true ) outputChatBox ("To buy this car write /buy", player, 255, 100, 0) end end I have this in Server Side but I want it to chance the outputChatBox to a dxDraw but dxDraw is client how can I get it in? should I do this; -- server function buyMsg (player) if showRoomVehicles[source] then setVehicleLocked ( source, true ) triggerClientEvent ( dxDraw, root ) end end --client function dxDraw ( player ) DxDrawRectangle(......) end addEvent( "dxDraw", true ) addEventHandler( "dxDraw", root, dxDraw )
-
Found it, noob fail
-
function shopBarrier barrier1 = createObject (994, -1940.90002, 271.29999, 40, 0, 0, 90) end expect ( near barrier1 but why? and where?