-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
I know that you took that code from another topic, but you've changed things, my script was supposed to load the skins after 1 second.
-
Is the file path correct? is the file in the meta.xml?
-
@GanJaRuleZ: That's wrong, you're giving wanted level even when he's using the skins allowed. Also, I want him to do it, is really simple.
-
Is not possible, but you can play your new weapon sounds over current.
-
Is not about the setPlayerWantedLevel function, this is Lua basics, you must use a 'else'. http://www.troubleshooters.com/codecorn ... and_Elseif
-
As far as I know, they're posting examples of how to use getPlayerTeam/getTeamName functions, you must learn their syntax.
-
No, that won't work, you have to set the wanted level IF they are not using the desired skins.
-
Your original code works perfectly fine, I get warped to position: 0, 0, 10.
-
That script will never work. if skin =={ [287] then ; [286] then ; } That's highly wrong. Should be: if ( skin == 287 or skin == 286 ) then For wanted level use: setPlayerWantedLevel.
-
-- 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, playername ); -- Why was you triggering 'row'? 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 ( playerName ) local player = getPlayerFromName ( playerName ) local playerip = getPlayerIP ( player ); local playerSerial = getPlayerSerial ( player ); local accountname = getAccountName ( getPlayerAccount ( player ) ); triggerClientEvent ( source, 'setText', source, playerName, ip, playerSerial, accountname ); end )
-
Everyone can learn what we ( the "pro" scripters ) know.
-
addEventHandler ( "onResourceStart", resourceRoot, function ( ) local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs ( allTeams ) do setTeamFriendlyFire ( theTeam, false ) end end )
-
I use this: local row, col = guiGridListGetSelectedItem ( yourGridListElement ) if ( row and col and row ~= -1 and col ~= -1 ) then --Your code here end
-
It would yes, but I won't release to public such script.
-
Examples are meant to help the person to understand how it works, if you do a mistake, then he'll also do it. @Kenix: "print" function is not disabled, if you use it, it'll output to the server console.
-
Try making the script server side instead.
-
Agree, if he/she releases this, then it'll become like MTA paradise, Valhalla Gaming scripts, everyone using them and no unique servers.
-
SkidMarks shader example: https://community.multitheftauto.com/index.php?p= ... ls&id=4152 Edit: Again skid marks shader example: https://community.multitheftauto.com/index.php?p= ... ls&id=4159
-
Is not MySQL, it's stored on MTA's SQLite database. About your problem: I think that you had another gang system running, using the same table names, that's the problem, you must remove them and then start my resource.
-
This has gone nowhere, I'm locking this topic.
-
-- server side: 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, 5.0) setElementFrozen ( ped, true ) end addEventHandler ( "onResourceStart", resourceRoot, testCreateTrainStuff ) --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 )
-
That's not an error from this script, I've tested it and works perfectly fine.
-
-- client side: --Create GUI function testCreateTestGUI ( ) test_window_main = guiCreateWindow (0.3,0.2,0.4,0.5,"Train Mission",true) memo1 = guiCreateMemo (0.15,0.2,0.7,0.5,"Nothing",true,test_window_main) test_window_main_button_acceitar = guiCreateButton(0.52,0.85,0.45,0.1,"Aceitar",true,test_window_main) test_window_main_button_sair = guiCreateButton(0,0.85,0.45,0.1,"Sair",true,test_window_main) showCursor ( true ) end addEvent ( "testCreateTestGUI", true ) addEventHandler ( "testCreateTestGUI", root, testCreateTestGUI ) --Destroy GUI function testDestroyTestGUI ( ) if isElement ( test_window_main ) then destroyElement ( test_window_main ) end if isElement ( memo1 ) then destroyElement ( memo1 ) end if isElement ( test_window_main_button_acceitar ) then destroyElement ( test_window_main_button_acceitar ) end if isElement ( test_window_main_button_sair ) then destroyElement ( test_window_main_button_sair ) end showCursor ( false ) end --On test Window Click function testOnTestWindowClick ( ) if ( source == test_window_main_button_acceitar ) then triggerServerEvent ( "testCreateTest", localPlayer ) testDestroyTestGUI ( ) elseif ( source == test_window_main_button_sair ) then testDestroyTestGUI ( ) end end addEventHandler ( "onClientGUIClick", root, testOnTestWindowClick ) -- server side: --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, 5.0) setElementFrozen ( ped, true ) end addEventHandler ( "onResourceStart", resourceRoot, testCreateTrainStuff ) --Create Vehicle function testCreateTest ( ) theTest = createVehicle ( 596, 1535.05615, -1675.60766, 12.96008 ) 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 )