-
Posts
216 -
Joined
-
Last visited
Everything posted by Mega9
-
Try this and change the event name at line 16 and 18 since I don't think it's called ":O" addEventHandler ( 'onClientGUIClick', ButtonBaggage, function ( ) triggerServerEvent ('spawnBaggage', localPlayer ) guiSetVisible ( Window1, false ) showCursor ( false ) destroyElement ( MissionMarker ) dodoMarker1 = createMarker (1286.41077, 1345.46094, 10, "cylinder", 2, 255, 255, 0, 255 ) blip1 = createBlipAttachedTo ( dodoMarker1, 41 ) dodoMarker2 = createMarker (1285.84778, 1309.42847, 10, "cylinder", 2, 255, 255, 0, 255 ) blip2 = createBlipAttachedTo ( dodoMarker2, 41 ) addEventHandler('onClientMarkerHit',dodoMarker1,showGui2,false) addEventHandler('onClientMarkerHit',dodoMarker2,showGui3,false) end ) addEventHandler ( 'onClientGUIClick', , function ( ) triggerServerEvent (':O', localPlayer ) guiSetVisible ( Window1, false ) showCursor ( false ) destroyElement ( MissionMarker ) dodoMarker1 = createMarker (1286.41077, 1345.46094, 10, "cylinder", 2, 255, 255, 0, 255 ) blip1 = createBlipAttachedTo ( dodoMarker1, 41 ) dodoMarker2 = createMarker (1285.84778, 1309.42847, 10, "cylinder", 2, 255, 255, 0, 255 ) blip2 = createBlipAttachedTo ( dodoMarker2, 41 ) addEventHandler('onClientMarkerHit',dodoMarker1,showGui2,false) addEventHandler('onClientMarkerHit',dodoMarker2,showGui3,false) end ) addEventHandler ( 'onClientGUIClick', ButtonTug, function ( ) triggerServerEvent ('spawnTug', localPlayer ) guiSetVisible ( Window1, false ) showCursor ( false ) destroyElement ( MissionMarker ) dodoMarker1 = createMarker (1286.41077, 1345.46094, 10, "cylinder", 2, 255, 255, 0, 255 ) blip1 = createBlipAttachedTo ( dodoMarker1, 41 ) dodoMarker2 = createMarker (1285.84778, 1309.42847, 10, "cylinder", 2, 255, 255, 0, 255 ) blip2 = createBlipAttachedTo ( dodoMarker2, 41 ) addEventHandler('onClientMarkerHit',dodoMarker1,showGui2,false) addEventHandler('onClientMarkerHit',dodoMarker2,showGui3,false) end ) addEventHandler('onClientGUIClick',Button2, function () triggerServerEvent('spawnDodo1',localPlayer ) destroyElement(dodoMarker1) destroyElement(dodoMarker2) destroyElement(blip1) destroyElement(blip2) guiSetVisible(Window2, false) showCursor(false) end ) addEventHandler('onClientGUIClick',Button3, function () triggerServerEvent('spawnDodo2',localPlayer ) destroyElement(dodoMarker1) destroyElement(dodoMarker2) destroyElement(blip1) destroyElement(blip2) guiSetVisible(Window3, false) showCursor(false) end )
-
Script works fine, there is another resource causing double messages. I remember I had the same problem, but forgot what was causing it exactly. Try leaving only admin and this resource on and see what happens.
-
addEventHandler('onPlayerChat', root, -- When player sends the message in chatbox function ( msg ) if ( msg ) == 'ping' then -- if message was "ping" then cancelEvent ( ) -- don't show the message outputChatBox(getPlayerName(source) .. "'s ping is: " .. getPlayerPing (source), root, 255, 255, 0 , true) -- Output player's name and ping end end )
-
I believe he meant replace the textures, not set vehicle's paintjob. He also pmed me about vehicle rims and as I had no clue and never even worked with those I told him it's possible with shaders, and probably replacing some texture files. If anyone has any more informations about this, please help him.
-
Have you tried with this (Wiki example): function PlayerJoin () -- Whoever joins the server should also have their nametags deactivated setPlayerNametagShowing ( source, false ) end addEventHandler ( "onPlayerJoin", root, PlayerJoin )
-
Never give up so easily. Do your best to make what you think is right, paste the code here, someone will guide you and that way you will learn!
-
You used "and" instead of "or" to check if the clicked element is a vehicle or player. function fuego(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if (not clickedElement) then return end if state == "down" and getElementType ( clickedElement ) == "vehicle" or "player" then local x, y, z = getElementRotation ( localPlayer ) local rx,ry,rz = getElementPosition ( localPlayer ) kame = playSound3D("kame.mp3", rx, ry, rz) setTimer(createProjectile, 3500, 1, localPlayer, 20, rx, ry, rz, 200, clickedElement, x, y, z ) if kame then setTimer(stopSound, 7000, 1, kame) end end end addEventHandler("onClientClick", root, fuego) EDIT: Ah, haven't seen the new post.
-
Let him try to do it first, that way he'll never learn.
-
^ Prateći te upute, dobiješ ovo: function destroyclan () local clan = getElementData ( source, "clan" ) removeElementData ( source, "clan" ) local clansroot = xmlLoadFile ("clans.xml") -- local clansroot = xmlFindChild (clans,"clans",0) if ( clansroot ) then for i,v in ipairs (xmlNodeGetChildren(clansroot)) do local xmlnumber = xmlNodeGetAttribute (v,"clan") xmlDestroyNode ( v ) xmlSaveFile ( clans ) xmlUnloadFile ( clans ) end end end addEvent ( "destroyclan", true ) addEventHandler ( "destroyclan", root, destroyclan )
-
Check it by getting engine state when player enters the vehicle ("onPlayerVehicleEnter") and setting it's values to what you want.
-
This will maybe help you: Quote from here.
-
getPlayerCount And a Wiki example: function playerCount ( ) outputChatBox ( "There are now " .. getPlayerCount() .. " players on this server!" ) end addEventHandler ( "onPlayerJoin", getRootElement(), playerCount ) addEventHandler ( "onPlayerQuit", getRootElement(), playerCount )
-
I know how does it work. I just asked what author of this topic meant.
-
Are zombies supposed to open gates or not?
-
Post your code so we can help you.
-
Why don't you use relative numbers? That would seem far better and more accurate for me.
-
Use the same code you used for your other gates, only thing you should do is add this: setElementDimension setElementInterior
-
What he meant by hex is a name of gang, not a hex code. Btw. he contacted me via PM where I explained him things he needed.
-
Add guiSetVisible (PANEL, false) @ line 50
-
And how do you get the "faction" name? With getElementData? If so, you've already done it good in first function, apply the same at second function when closing gates.
-
Oh right, that one slipped. Let's see if he can figure it out himself.