-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
He'll also need either a timer or onClientPreRender to keep the ped in the right direction.
-
Post the specific part you made changes to.
-
I don't think you defined 'name', use 'client'.
-
Custom animations aren't supported.
-
I think he wants an script which let's you make your vehicle jump when press a key. @Shadex: Is not a hard script, but we won't do it for you, you must learn to do it.
-
You're sure? because I tested it with a friend and he said it also exploded on his screen.
-
Yes, you are using column names which doesn't exist. Eg: "PlayerName", but your column is "name". Also, you are inserting for 4 columns, but your table has just one.
-
Tried moving the pickup higher?
-
I don't think you can unbind it at all.
-
Instead of a bunch of functions and events it may be more useful and practical to use it client-sided and onClientResourceStart Can be done both ways, is up to him.
-
That's not right, to change spawnpoints, you must go to "play/broph.map".
-
addEvent ( "updateBankauszug", true ) addEventHandler ( "updateBankauszug", root, function ( player, wert, state, grund ) if ( state == "+" ) then art = "Einnahme" else art = "Ausgabe" end for bankindex = 1, 12 do setElementData ( player, "Art".. bankindex, getElementData ( player, "Art".. bankindex + 1 ) ) setElementData ( player, "Wert".. bankindex, getElementData ( player, "Wert".. bankindex + 1 ) ) setElementData ( player, "Grund".. bankindex, getElementData ( player, "Grund".. bankindex + 1 ) ) end setElementData ( player, "Wert1", setDotsInNumber ( wert ) .."$" ) setElementData ( player, "Grund1", grund ) setElementData ( player, "Art1", art ) end ) Try it.
-
That's because "fps" and "healthbar" aren't defined.
-
No, you just mixed my code with yours, it's just an example, you must study it.
-
-- server side: addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "H", "down", playHorn ) bindKey ( player, "H", "up", playHorn ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "H", "down", playHorn ) bindKey ( source, "H", "up", playHorn ) end ) function playHorn ( thePlayer, key, keyState ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if ( not theVehicle ) then return end if ( getElementModel ( theVehicle ) == 537 ) then triggerClientEvent ( "vehicleHorn", root, ( keyState == "down" and true or false ), theVehicle ) end end -- client side: addEvent ( "vehicleHorn", true ) addEventHandler ( "vehicleHorn", root, function ( state, theVehicle ) if isElement ( desusound ) then stopSound ( desusound ) end if ( state ) then local x, y, z = getElementPosition ( theVehicle ) desusound = playSound3D ( 'hupe/ZUGHUPE.mp3', x, y, z ) setSoundVolume ( desusound, 5.0 ) setSoundMaxDistance ( desusound, 190 ) attachElements ( desusound, theVehicle ) end end )
-
This is a simple on how to send/add to gridlist the content of a table: -- client side: addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) myGridList = guiCreateGridList ( 50, 50, 100, 100, false ) -- Create a GUI gridlist triggerServerEvent ( "getTableContent", localPlayer ) -- Trigger a server side event to get the data end ) addEvent ( "returnTableContent", true ) addEventHandler ( "returnTableContent", root, function ( content ) for _, text in ipairs ( content ) do -- Loop the items from the 'content' table sent from the server side. guiGridListSetItemText ( myGridList, guiGridListAddRow ( myGridList ), 1, text, false, false ) -- Add it to the gridlist. end end ) -- server side: myTable = -- Define the table. { "Hello", "World" } addEvent ( "getTableContent", true ) addEventHandler ( "getTableContent", root, function ( ) triggerClientEvent ( client, "returnTableContent", client, myTable ) -- Send the 'myTable' content to the client side. end )
-
What do you mean by the server-sided? and if I'm right, didn't I gave you the script already? it doesn't require a server side script.
-
game-state still works, check my signature.
-
My server uses RedStation host, the only issue you may have is that it's not cheap, but still, I recommend it. website: http://www.redstation.com/
-
Try this: setPedAnimation ( playeranimdamage, "beach", "bather", 5000, true )
-
We don't give support with leaked scripts. Topic locked.
-
Same problem. Repeat in less than a second, is not expected until the end of the animation. The loop argument will repeat it after it ended.
-
setPedAnimation ( playeranimdamage, "beach", "bather", -1, true ) Use that instead.
