-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
exports.bone_attach:attachElementToBone ( object [ source ], source, 1, 0.025, -0.01, 0.815, 0, 0, 180 ) I added the bone ID after "source".
-
I would suggest loading all the content of the XML into a lua table, then you can easily get it.
-
How to really return a something out of a table?
Castillo replied to HeavyMetal's topic in Scripting
What goes inside the [ ] is the row index, and what goes after the dot is the column name. -
I don't know to what bone you want to attach it, so I put the first one ( head ). object = { } addEvent ( "xxx", true ) addEventHandler ( "xxx", root, function ( model ) if isElement ( object [ source ] ) then destroyElement ( object [ source ] ) end local x, y, z = getElementPosition ( source ) object [ source ] = createObject ( model, x, y, z ) exports.bone_attach:attachElementToBone ( object [ source ], source, 1, 0.025, -0.01, 0.815, 0, 0, 180 ) end ) addEventHandler ( "onPlayerQuit", root, function ( ) if isElement ( object [ source ] ) then destroyElement ( object [ source ] ) end end )
-
function DanceStripGui ( ) local money = getPlayerMoney ( ) local points = getElementData ( localPlayer, "Points" ) if ( money < 500 and points < 50 ) then return guiSetText ( StripMoneyLabel, "( You don't have enough money and points ! ($500 and 50P) )" ) end if ( money >= 500 ) then if ( points >= 50 ) then guiSetVisible ( StripWindow, false ) showCursor ( false ) guiSetInputEnabled ( false ) takePlayerMoney ( 500 ) setCameraInterior ( 5 ) setCameraMatrix ( 2232.5283, -1108.1843, 1051, 2229.2053, -1106.5839, 1050.5828 ) showPlayerHudComponent ( "radar", false ) setTimer ( setCameraTarget, 15005, 1, getLocalPlayer() ) setTimer ( setCameraInterior, 15005, 1, 2 ) setTimer ( setElementPosition, 15000, 1, getLocalPlayer(), 1204.8, 11.665545463562, 1001 ) setTimer ( setElementInterior, 15000, 1, getLocalPlayer(), 2 ) setTimer ( showPlayerHudComponent, 15000, 1, "radar", true ) local PedSkin = getElementModel ( getLocalPlayer() ) setElementModel ( Guy, PedSkin ) else guiSetText ( StripMoneyLabel, "( You don't have enough points ! (50P) )" ) end else guiSetText ( StripMoneyLabel, "( You don't have enough money ! ($500) )" ) end end addEventHandler ( "onClientGUIClick", StripBuyBtn, DanceStripGui, false )
-
Do you mean when you click on "pages" grid list, it'll show the "text" in a edit?
-
There's no really need to save it on SQL, you can enable the autologin on the mtaserver.conf.
-
function DanceStripGui ( ) local money = getPlayerMoney ( ) local points = getElementData ( localPlayer, "Points" ) if ( money >= 500 ) then if ( points >= 50 ) then guiSetVisible ( StripWindow, false ) showCursor ( false ) guiSetInputEnabled ( false ) takePlayerMoney ( 500 ) setCameraInterior ( 5 ) setCameraMatrix ( 2232.5283, -1108.1843, 1051, 2229.2053, -1106.5839, 1050.5828 ) showPlayerHudComponent ( "radar", false ) setTimer ( setCameraTarget, 15005, 1, getLocalPlayer() ) setTimer ( setCameraInterior, 15005, 1, 2 ) setTimer ( setElementPosition, 15000, 1, getLocalPlayer(), 1204.8, 11.665545463562, 1001 ) setTimer ( setElementInterior, 15000, 1, getLocalPlayer(), 2 ) setTimer ( showPlayerHudComponent, 15000, 1, "radar", true ) local PedSkin = getElementModel ( getLocalPlayer() ) setElementModel ( Guy, PedSkin ) else guiSetText ( StripMoneyLabel, "( You don't have enough points ! (50P) )" ) end else guiSetText ( StripMoneyLabel, "( You don't have enough money ! ($500) )" ) end end addEventHandler ( "onClientGUIClick", StripBuyBtn, DanceStripGui, false ) Also, if you take the money client side, it won't sync with the server side, you must do it server side. And the skin will be only changed on your client only.
-
First one uses absolute positions, and the second uses relative. In the guieditor you can change the output type.
-
It doesn't include passwords though, which is what he wants.
-
addCommandHandler Example ( server side ): addCommandHandler ( "testing", function ( thePlayer, cmd, arg ) outputChatBox ( arg ) end )
-
If I'm right, you can't, it's just one gate and you must set the position inside "gate.map", and the password at "server.lua".
-
You're welcome.
-
Try checking if the function is actually being executed by adding an outputChatBox.
-
object = createObject(2933, 2582.1000976563, -2123.6000976563, 1.3999999761581) marker = createMarker(2581.8000488281, -2123, -0.5, "cylinder", 2, 100, 0, 0, 100) function gateo ( player ) local team = getPlayerTeam ( player ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Admin" ) then moveObject ( object, 2000, 2582.1000976563, -2123.6000976563, -5 ) end end addEventHandler ( "onMarkerHit", root, gateo ) function gatec ( player ) moveObject ( object, 2933, 2582.1000976563, -2123.6000976563, 1.3999999761581 ) end addEventHandler ( "onMarkerLeave", root, gatec )
-
Well, you'll have to make a script to show it from the server side, because the functions to check if is admin are server side only. Functions you need: getPlayerAccount getAccountName isObjectInACLGroup triggerClientEvent
-
You must change the script version, then upload.
-
Create a table and insert all the messages there, then get a random message with: math.random
-
Evento: onVehicleStartEnter Funciones: getPlayerAccount getAccountName cancelEvent
-
El primer argumento de "onBotWasted" es el que lo mato, no la municion.
-
Pone: addEvent ( "onBotWasted", true ) ademas del addEventHandler.
-
You put the function name twice.
