Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You'll have to use the event: onClientClick and compare cursor position with getCursorPosition.
  2. Esa funcion no existe.
  3. No. addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS peds ( ID Peds, X REAL, Y REAL, Z REAL, rX REAL, rY REAL, rZ REAL )" ) end )
  4. Castillo

    A code!

    You're welcome.
  5. Castillo

    A code!

    Use the property: "NormalTextColour"
  6. Castillo

    Hi all

    He said bank money, maybe 50p's bank system.
  7. To attach an element to another element you must use: attachElements.
  8. I would never do that, know why? because I don't need to, also, my resources doesn't need any ACL privileges, so it would be impossible to do it . @Back on topic: The function getGangMembers returns a table with the account names of the members. You should've using the "gang" element data to check who's in that gang. Your script should look like this: function onChat ( thePlayer, _, ... ) local account = getPlayerAccount ( thePlayer ) local accountName = getAccountName ( account ) local gangName = exports.gang_system:getAccountGang ( accountName ) if ( gangName and gangName ~= "None" ) then local msg = table.concat ( { ... }, " " ) local nick = getPlayerName ( thePlayer ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "gang" ) == gangName ) then outputChatBox ( "#FF00FF(GC) ".. nick ..": #FFFFFF".. msg, player, 255, 100, 0, true ) end end end end addCommandHandler ( "gc", onChat )
  9. No, you set the columns in wrong syntax.
  10. You have to use triggerServerEvent to take the money server side.
  11. If you take the money client side, it won't sync with the server side, player will still have it.
  12. Just create the marker when you click the button?
  13. I still don't understand what are you trying to do.
  14. "other marker", you haven't got any marker there.
  15. Tema movido a: "Ayuda relacionada al cliente/servidor".
  16. -- client side: local posTab = { sx, sy, sz, srot } triggerServerEvent("requestVehicleSpawn", localPlayer, 448, posTab) addEvent ( "returnVehicleSpawned", true ) addEventHandler ( "returnVehicleSpawned", root, function ( vehicle ) if ( vehicle ) then outputChatBox ( "You've just spawned a: ".. getVehicleName ( vehicle ) ) else outputChatBox ( "Vehicle not sent from server side." ) end end ) -- server side: ----- SPAWNS REQUESTED VEHICLE AT POSITION function spawnTheVehicle(modelid, position) -- Never call a function like a default function name. local car = createVehicle(modelid, position[1], position[2], position[3], 0, 0, position[4]) warpPedIntoVehicle(source, car) triggerClientEvent ( source, "returnVehicleSpawned", source, car ) end addEvent("requestVehicleSpawn", true) addEventHandler("requestVehicleSpawn", root, spawnTheVehicle)
  17. No tiene el menor sentido, sin ofender.
  18. No, I said a timer to set the "fire" control state to false then to true, constantly. addEventHandler ( "onClientPedDamage", getRootElement(), function ( attacker, weapon ) if ( attacker ) and ( weapon < 22 ) then local helperPed = getPlayerHelper ( localPlayer ) if ( helperPed ) then setPedControlState ( helperPed, "fire", true ) setTimer ( function ( thePed ) if ( thePed ) then setPedControlState ( thePed, "fire", false ) end end ,200, 0, helperPed ) setTimer ( function ( thePed ) if ( thePed ) then setPedControlState ( thePed, "fire", true ) end end ,500, 0, helperPed ) end cancelEvent ( ) end )
  19. @Maurize: That's because you have to use a timer to set it to false then to true. @Jaysd1: You should have read his posts more carefully, he said that the ped only shoots once.
  20. addEventHandler ( "onClientGUIClick", myGridList, function ( ) local row, col = guiGridListGetSelectedItem ( source ) -- Get the current selected item. if ( row and col and row ~= -1 and col ~= -1 ) then -- If he has indeed selected an item. local test = guiGridListGetItemText ( source, row, 1 ) -- Get the first column text. outputChatBox ( test ) -- Output it to the chat. end end ,false )
×
×
  • Create New...