-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
The admin panel executes a command called 'nextmap', you have to add a event inside the function of that command which will trigger to client side using triggerClientEvent to update the 'Next Map' text. The function is on: 'race/racevoting_server.lua' search for 'nextmap'.
-
No, that's a mess. -- client side: lights = guiCreateWindow(211,276,322,202,"Vehicle Headlight - $2500",false) redEdit = guiCreateEdit(110,54,142,24,"",false,lights) greenEdit = guiCreateEdit(110,87,143,26,"",false,lights) blueEdit = guiCreateEdit(108,125,149,27,"",false,lights) redtx = guiCreateLabel(39,58,64,19,"Red, 0-255:",false,lights) greentx = guiCreateLabel(24,93,75,19,"Green, 0-255:",false,lights) bluetx = guiCreateLabel(32,129,67,17,"Blue, 0-255:",false,lights) buyVLightsButton = guiCreateButton(97,176,70,17,"Purchase",false,lights) cancelPurchaseButton = guiCreateButton(166,176,74,17,"Cancel",false,lights) addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == buyVLightsButton ) then local red = guiGetText ( redEdit ) local green = guiGetText ( greenEdit ) local blue = guiGetText ( blueEdit ) if ( red and green and blue ) then if ( isPedInVehicle ( localPlayer ) ) then local veh = getPedOccupiedVehicle ( localPlayer ) triggerServerEvent("onHeadLightsChange",localPlayer,veh,red,green,blue) else outputChatBox ( 'You are not in a vehicle!' ) end end elseif ( source == cancelPurchaseButton ) then guiSetVisible ( lights, false ) showCursor ( false ) end end ) -- server side: addEvent("onHeadLightsChange",true) addEventHandler("onHeadLightsChange",root, function (currentVehicle, red, green, blue) if (currentVehicle) then setVehicleHeadLightColor ( currentVehicle, tonumber(red) or 255, tonumber(green) or 255, tonumber(blue) or 255 ) outputChatBox ( 'You have changed your vehicle lights!', source ) end end )
-
Nice work, congratulations for your first remake .
-
You should check if the player has a vehicle, if not, health would be 0%.
-
Copy the code again, I didn't see that, it shouldn't be there.
-
Yes, that should be fixed, it happened to me too .
-
Then what o_o? & @Draken, thank you, it worked Use triggerServerEvent to trigger a event to the server side, there you can also take the money, because taking money client side won't work.
-
I don't even know if that would be possible, if it is, it may be hard to achieve, as you can't really know who killed him.
-
I don't know, but I think my code should also work, I could have used a variable like you did, but I wanted to see if it was possible to make it without it.
-
Trailers have a bad sync, if you're far you see the trailer attach and detach from the truck. Some times they are also invisible, the player who's driving the truck can see the trailer, but remote players can't.
-
Solo con los vehiculos que pueden usar Paintjobs, proba con el: Elegy, Jester.
-
Try this: local pickups = { createMarker ( 1978.5877685547, 1026.3675537109, 993.50002441406, "cylinder", 1, 100, 100, 100, 170 ), createMarker ( 1978.5877685547, 1026.3675537109, 993.50002441406, "cylinder", 1, 100, 100, 100, 170 ) } addEventHandler("onResourceStart",resourceRoot, function () for index, pickup in ipairs(pickups) do setElementInterior (pickup, 10) addEventHandler( "onMarkerHit", pickup, mafiamarker ) end end ) function mafiamarker (hitElement, matchingDimension) local elementType = getElementType( hitElement ) if (elementType == "player") then setElementModel ( hitElement, 111 ) setPlayerTeam ( hitElement, teammaffia ) takeAllWeapons ( hitElement ) giveWeapon ( hitElement, 8, 1, true ) giveWeapon ( hitElement, 32, 550, true ) giveWeapon ( hitElement, 16, 100, true ) giveWeapon ( hitElement, 24, 207, true ) setPedArmor ( hitElement, 0 ) end end
-
You're wrong karlis, file functions are client side too now. https://wiki.multitheftauto.com/wiki/FileWrite
-
You're welcome.
-
Si, el recurso tiene Paintjobs tambien.
-
-- client side: window = guiCreateWindow(17,5,550,450,"pick nick",true) nick = guiCreateEdit(140,20,180,30,"",true,window) triggerServerEvent ( "change", localPlayer, guiGetText(nick) ) -- server side: addEvent("change",true) addEventHandler("change",root, function(newNick) setPlayerName(source, newNick) end )
-
If you change the head lights client side, others won't see them.
-
So you've made a forum without even having someone really working on the server? as you don't have Scripting knowledge. P.S: Is really hard to get a scripter to work only for Admin privileges.
-
https://community.multitheftauto.com/index.php?p= ... ils&id=169 Ese recurso es un Mod Shop (Tuning).
-
Do you mean a external server? https://wiki.multitheftauto.com/wiki/Ser ... web_server
-
You have to configure the database details on: sql/mysql.lua. If I'm right, the MTA paradise brings a .sql file which can be imported with phpMyAdmin.
-
function replaceModel() if (txd and dff) then destroyElement(txd) destroyElement(dff) else txd = engineLoadTXD("models/fbi.txd", 490 ) engineImportTXD(txd, 490) dff = engineLoadDFF("models/fbi.dff", 490 ) engineReplaceModel(dff, 490) end end bindKey("F6","down",replaceModel) addEventHandler ( "onClientResourceStart", resourceRoot, replaceModel)
-
Por favor, dejen de hacer off-topic, pueden hablar sobre eso en PM.