drk
Members-
Posts
1,607 -
Joined
-
Last visited
Everything posted by drk
-
Is your team FBI? You get any error?
-
@@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 )
-
LOOOOL Simply create the image like a window. What the problem? @@sckatchof Drawing functions aren't needed. Only if you want.
-
1 and 2. addEventHandler ( 'onClientRender', element, function ( ) dxDrawText ( ... ) end ) 3. I will not answer this oO
-
It's png file already. I tried all file types and graphics configuration of image.
-
Only because doesn't lag here
-
LOL LOL LOL LOL That's a bad copy paste X-SHADOW =D
-
Then, script it by yourself. This is the basic of Lua. If you don't know how to do that, better start learning.
-
Agree with Kenix too. All use scripts from others This time, no one wants more to learn
-
Easy map. Gj. Can you give me these lights?
-
We don't know, you posted this event, we have only solved the issues.
-
That's what I put in my code. Next time see posts first
-
You can't enter in your script by external IP without open ports.
-
So easy, but awesome.
-
I've not seen this Copy code again.
-
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 )
-
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.
-
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 )
-
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.
