Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. Is your team FBI? You get any error?
  2. @@sckatchof Your code is wrong. You can't attack a command to a nil function. And you need use a for-loop to get all players in team. Here: addCommandHandler ( 'f', function ( player, command, ... ) local text = table.concat ( { ... }, " " ) if ( getPlayerTeam ( player ) == "FBI" ) then for _, players in ipairs ( getPlayersInTeam ( getPlayerTeam ( player ) ) ) do outputChatBox ( "( FBI RADIO ) " .. getPlayerName ( player ) .. " says: " .. text, players, 0, 0, 205, true ); end end end )
  3. drk

    gui

    LOOOOL Simply create the image like a window. What the problem? @@sckatchof Drawing functions aren't needed. Only if you want.
  4. drk

    dxDrawImage

    1 and 2. addEventHandler ( 'onClientRender', element, function ( ) dxDrawText ( ... ) end ) 3. I will not answer this oO
  5. It's png file already. I tried all file types and graphics configuration of image.
  6. drk

    need your opinion xD

    Only because doesn't lag here
  7. drk

    need your opinion xD

    Noob and bad mapped.
  8. drk

    [SOLVED]

    LOL LOL LOL LOL That's a bad copy paste X-SHADOW =D
  9. drk

    Restricted Area

    Then, script it by yourself. This is the basic of Lua. If you don't know how to do that, better start learning.
  10. Agree with Kenix too. All use scripts from others This time, no one wants more to learn
  11. Easy map. Gj. Can you give me these lights?
  12. drk

    need help.

    We don't know, you posted this event, we have only solved the issues.
  13. drk

    need help.

    That's what I put in my code. Next time see posts first
  14. drk

    JoinQuit

    You can't enter in your script by external IP without open ports.
  15. drk

    Not Working

    I've not seen this Copy code again.
  16. drk

    Not Working

    local policeCars = { } -- We create a table. --Create Stuff function testCreateTrainStuff ( ) test_marker_request = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170) createBlip ( 1543.98962, -1670.46398, 13.55753, 41) ped = createPed (280,1543.98962,-1670.46398,13.55753, 90) setElementFrozen ( ped, true ) end addEventHandler ( "onResourceStart", resourceRoot, testCreateTrainStuff ) addEventHandler ( "onClientPedDamage", ped, function ( ) cancelEvent ( ) end ) addEventHandler ( 'onMarkerHit', root, function ( uElement ) if source == myMarker then local uTeam = getPlayerTeam ( uElement ) if uTeam and getTeamName( uTeam ) == 'Policia' and getElementModel ( uElement ) == 280 then outputChatBox 'TODO' end end end ) --Create Vehicle function testCreateTest ( ) if ( isElement ( policeCars[ source ] ) ) then -- We check if the player already has a car spawned. destroyElement ( policeCars[ source ] ) -- If so, we destroy it. end policeCars[ source ] = createVehicle ( 596, 1535.05615, -1675.60766, 12.96008 ) -- We create the vehicle stored in 'policeCars' table. outputChatBox ("Você virou Policial", source, 255, 0, 0 ) end addEvent ( "testCreateTest", true ) addEventHandler ( "testCreateTest", root, testCreateTest ) --Test Gui function testCreateTestGUI ( hitElement ) if ( source == test_marker_request ) then triggerClientEvent ( hitElement, "testCreateTestGUI", hitElement ) end end addEventHandler ( "onMarkerHit", root, testCreateTestGUI )
  17. drk

    Not Working

    I ever forget something -.-
  18. drk

    JoinQuit

    Maybe your ports aren't open. Say your friends to put the resource in his server ( if someone of your friends have ) then test it.
  19. drk

    need help.

    Fail Client-side: addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == GridListePlayer ) then local row, col = guiGridListGetSelectedItem ( GridListePlayer ); if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GridListePlayer, row, 1 ); triggerServerEvent ( 'triggerData', localPlayer, row, playername ); end end end ) addEvent ( 'setText', true ); addEventHandler ( 'setText', root, function ( player, ip, serial, account ) guiSetText ( LabelName, "Name : " .. tostring(player) .. " " ); guiSetText ( LabelIp, "IP : " ..tostring(ip) .." " ); guiSetText ( LabelSerial, "Serial : " ..tostring(serial) .." " ); guiSetText ( LabelAccountName, "Account Name : " ..tostring(account) .." " ); triggerServerEvent ( 'ListInfo', localPlayer, player, ip, serial, account ); end ) Server-side: addEvent ( "ListInfo", true ); addEventHandler ( "ListInfo", root, function ( playerName, ip, serial, account ) -- something with playerName -- something with ip -- something with serial -- something with account end ) addEvent ( 'triggerData', true ); addEventHandler ( 'triggerData', root, function ( row, player ) playerip = getPlayerIP ( player ); playerSerial = getPlayerSerial ( player ); accountname = getAccountName ( getPlayerAccount ( player ) ); triggerClientEvent ( 'setText', source, player, ip, playerSerial, accountname ); end )
  20. drk

    Help :?

    When you create the object in the Map Editor, put the cursor over the object. In front of the name of, will appear a number. This is the id assigned to the object. Get it and search in the .map file. Be sure that your object where you find id is the object you are searching because the id counts from the number of type of objects, it's not count of all.
  21. drk

    Not Working

    I know, it's only a example.
×
×
  • Create New...