-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You'll have to use the event: onClientClick and compare cursor position with getCursorPosition.
-
Simple: You can't.
-
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 )
-
3d Radio - attach the sound to the radio created.
Castillo replied to jomarisk8er's topic in Scripting
To attach an element to another element you must use: attachElements. -
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 )
-
No, you set the columns in wrong syntax.
-
You have to use triggerServerEvent to take the money server side.
-
If you take the money client side, it won't sync with the server side, player will still have it.
-
Just create the marker when you click the button?
-
I still don't understand what are you trying to do.
-
"other marker", you haven't got any marker there.
-
Tema movido a: "Ayuda relacionada al cliente/servidor".
-
You're welcome. P.S: Yeah, Dr.Who is awesome .
-
I'm locking this topic.
-
-- 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)
-
No tiene el menor sentido, sin ofender.
-
You're welcome .
-
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 )
-
@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.
-
You're welcome.
-
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 )
