-
Posts
243 -
Joined
-
Last visited
Everything posted by Desaster
-
hello, I am trying to make a train script so the script work ok but idk what does this error mean could you help me with that WARNING: train\server.lua:18: Bad 'vehicle' pointer @ 'setTrainSpeed'(1) thnx
-
try to put the timer more 300 put it 5000 or 2000
-
hello, can you gimme some functions that get's that real daytime and real week day thnx for reading
-
could you make it that a player download a file after he pressed apply ?
-
nice one could anyone edit it as he like ?
-
function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in local veh = getElementData (source, "hisCar1") local r, g, b = getVehicleColor(veh) -- get the player money setAccountData ( playeraccount, "color", ""..r, g, b ) -- save it in his account end end function onPlayerLogin (_, playeraccount ) -- when a player logins, retrieve his money amount from his account data and set it if ( playeraccount ) then local r, g, b = getAccountData ( playeraccount, "color" ) local veh = getElementData (source, "hisCar1") -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( color ) then setVehicleColor ( veh, r, g, b, 255 ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) still don't work maybe the problem is that the vehicle will be spawned after ?
-
hello , it me again asking for help I hope you don't get annoyed from me I made this could you tell me what is the problem ? ----------------------------------------Color Saver-------------------------------------- function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in local veh = getElementData (source, "hisCar1") local rgb = getVehicleColor(veh) -- get the player money setAccountData ( playeraccount, "color", rgb ) -- save it in his account end end function onPlayerLogin (_, playeraccount ) -- when a player logins, retrieve his money amount from his account data and set it if ( playeraccount ) then local color = getAccountData ( playeraccount, "color" ) local veh = getElementData (source, "hisCar1") -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( color ) then setVehicleColor ( veh, color, 0 ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
-
I want to intengrate color picker in a button than to get that coulour and set it to the vehicle this picker https://community.multitheftauto.com/ind ... ls&id=3247 can you gimme some functions that I can use ?
-
replace the Object id with your object ID and replace x, y, z with your position
-
function createTheGate () gate1 = createObject ( Object ID, x, y, z ) gate2 = createObject ( Objecy ID, x, y, z ) --use rotx roty rotz after the z ex createObject( 986, 234, 11, 1, 90, 180, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( gate1, Object ID, x, y, z ) moveObject ( gate2, Object ID, x, y, z ) setTimer ( movingMyGateBack, seconds, 1 ) end addCommandHandler("password",openMyGate) function movingMyGateBack () moveObject ( gate1, Object ID, x, y, z ) moveObject ( gate2, Object ID, x, y, z ) end
-
I couldn't specify the seat of the driver I tryed this and many other this but it won't work help me pls function engineSwitch1 () if (seat == 0) then -- the error is here if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleEngineState (veh) == true) then setVehicleEngineState (veh, false) outputChatBox ("Vehicle shutted down.", source, 255, 0, 0) elseif (getVehicleEngineState (veh) == false) then setVehicleEngineState (veh, true) outputChatBox ("Vehicle started.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end else outputChatBox ("You aren't the Driver of this Vehicle!", source, 255, 0, 0) end end addEvent("engenieSwitch1",true) addEventHandler("engenieSwitch1",getRootElement(),engineSwitch1)
-
there is a problem when anyone thouch the marker every one see the gui
-
I want to creat a table that show 1 gui every time you enter one of the tables I tryed this but it won't work local CarsTable = { {-1974.662109375, 304.943359375, 34.171875}, {-2535.45703125, -603.28125, 131.562}, {-1947.033203125, 1384.6689453125, 6.1842346191406}, {-309.84765625, 1531.3017578125, 74.359375}, {-1979.05078125, 433.1484375, 24.684421539307}, {2804.23828125, -1429.646484375, 39.05331802368}, {-2245.462890625, 2371.8662109375, 3.996054649353}, {-2088.697265625, -2334.876953125, 29.625}, {-2754.69140625, 374.138671875, 3.339025497436}, {1245.85546875, -2027.7939453125, 58.830238342285}, {-1407.2783203125, -312.3896484375, 12.992641448975} } function menuShow() visableornot = guiGetVisible (theWindow) if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end marker1 = createMarker ( CarsTable[1], CarsTable[2], CarsTable[3], "cylinder", 2.0, 250, 50,0, 150) addEventHandler ("onClientMarkerHit", marker1, menuShow) ps it's a client file
-
post you meta.xml maybe the error is there
-
then I can use it like this export.myresourcename:getGamemodes()
-
look nice but try to bind it to a city
-
I want to make this function exported how ? ps : it also have a .fx file and how I can use it after i mean the arguments local w, h = guiGetScreenSize( ); local enable = false; addEventHandler("onClientMarkerHit", marker, enableBlackWhite) function renderEffect( ) --some stuff end function enableBlackWhite( ) -- some stuff end
-
hello, you know that turf system made by Sasuke (https://community.multitheftauto.com/index.php?p=resources&s=details&id=6772) so works for me ( I use a edited version ) but I don't know really why the turfs are limited I can't find the part that specify the number could you help me ?
