-
Posts
174 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Hale
-
Hello everyone, I have a custom modloader that keeps dumping errors for loading each DFF and TXD, and since I have 13 files in total it outputs 26 errors every time I join my server or restart the resource (the consequences are same). Here's the thing: I restart the resource, which executes the event "onClientResourceStart", and in its function a GUI loads up and at the end it executes "refreshMods()" which cycles through the mods and applies them with function ApplyPatch(), and it actually works as in-game the textures can actually be seen. The only problem is the debug error, which says: "Attempt to load 'folder/file.txd' before onClientFileDownloadComplete event". Any ideas on how to fix it? ApplyPatch() Event "onClientFileDownloadComplete":
-
Hi, Can you edit/add things into ACL while the server is working? And if so, do they automatically apply in-game or do you have to restart the server or somehow refresh ACL? Thanks in advance.
-
function setBlip( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) if theSkin == 21 then outputChatBox("medic_blip", thePlayer, 255, 255 ,255) local blip_medic = createBlipAttachedTo ( source, 22 ) local players = getPlayersInTeam(theTeam) setElementVisibleTo(blip_medic, getRootElement(), true) end end addEventHandler ( "onPlayerSpawn", getRootElement(), setBlip ) Also, I don't see any 'createBlip' functions in your code?
-
In both loops you create an object/marker that deletes the last one, as you reassigned the value.
-
I believe it's because the source is the function that called the event, not the player. You must pass the correct parameters (the player) to the function and then use them.
-
How are you doing the transition between colors, can you share that part of the code?
-
Oh, my bad. Well, at least you fixed it.
-
vehController = getVehicleController ( hitElement )
-
vehController is the player, it must work lol
-
Try this: function movingObject ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "vehicle" ) then vehController = getVehicleController ( hitElement ) if ( not vehController ) then -- why vehController? Because 'hitElement' is already true (in the 2. line) return false; end end local gPT = getPlayerTeam ( vehController ) local gTN = ( gPT and getTeamName ( gPT ) or "" ) if gTN =="Los Santos Civilians" then if getElementType ( vehController ) == "player" then moveObject ( gate1, 10000, 1201, -1384.5, 9.3 ) end end end function moveObjectBack (hitElement, matchingDimension) if ( getElementType ( hitElement ) == "vehicle" ) then vehController = getVehicleController ( hitElement ); if ( not vehController ) then return false; end end local gPT = getPlayerTeam ( vehController ) local gTN = ( gPT and getTeamName ( gPT ) or "" ) if gTN =="Los Santos Civilians" then if getElementType ( vehController ) == "player" then moveObject ( gate1, 3000, 1201, -1384.5, 15.1 ) end end end addEventHandler ( "onMarkerHit", marker1 , movingObject ) addEventHandler ( "onMarkerLeave", marker1, moveObjectBack )
-
This is basically what I meant, thanks for detailing it
-
Did you make sure to sign column 'id' as identity?
-
Maybe you can use a fully transparent .png on the GUI window? Just thoughts, never tested it.
-
Ooooh, my bad... Well, just make a loop that checks for nearby vehicles in 1-2 meter radius and find an event for spraying, that's a start I guess?
-
You can make an 'OutputChatBox' on the start of the spraying and on the end, just find where it is in the script.
-
This'll fix the problem: local foundPlayer = getPlayerFromName("name") if (foundPlayer ~= nil) then setElementData(foundPlayer ,"data",value) end
-
Is anything being output on the debug? (/debugscript)
-
Read what it says... You're missing a .png file in the resource file.
-
Can you explain a bit further please?
-
"Prolly" my ass, that's what happens when he wants to act smart lol Do I even know you? Nope, just another fan of yours trying to asslick you, accept me.
-
https://forums.vc-rp.net/ This server uses Vice City map.
-
myShader, tec = dxCreateShader ( "water.fx" ) function applyWaterShader() local textureVol = dxCreateTexture ( "images/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "images/cube_env256.dds" ); dxSetShaderValue ( myShader, "sRandomTexture", textureVol ); dxSetShaderValue ( myShader, "sReflectionTexture", textureCube ); engineApplyShaderToWorldTexture ( myShader, "waterclear256" ) end function removeWaterShader() engineRemoveShaderFromWorldTexture( myShader, "waterclear256" ) end This was my problem before, try that instead.