Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. He'll also need either a timer or onClientPreRender to keep the ped in the right direction.
  2. Post the specific part you made changes to.
  3. I don't think you defined 'name', use 'client'.
  4. Custom animations aren't supported.
  5. 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.
  6. You're sure? because I tested it with a friend and he said it also exploded on his screen.
  7. 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.
  8. Tried moving the pickup higher?
  9. I don't think you can unbind it at all.
  10. 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.
  11. That's not right, to change spawnpoints, you must go to "play/broph.map".
  12. 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.
  13. That's because "fps" and "healthbar" aren't defined.
  14. No, you just mixed my code with yours, it's just an example, you must study it.
  15. -- 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 )
  16. 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 )
  17. Castillo

    is this done?

    You can't play videos on MTA.
  18. 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.
  19. game-state still works, check my signature.
  20. 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/
  21. Castillo

    A question.

    Try this: setPedAnimation ( playeranimdamage, "beach", "bather", 5000, true )
  22. We don't give support with leaked scripts. Topic locked.
  23. Castillo

    A question.

    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.
  24. Castillo

    A question.

    setPedAnimation ( playeranimdamage, "beach", "bather", -1, true ) Use that instead.
×
×
  • Create New...