-
Posts
57 -
Joined
-
Last visited
About Potato_Tomato420
- Birthday 14/08/1995
Details
-
Gang
Los Santos
-
Location
The Netherlands
-
Occupation
Scripting
-
Interests
Roleplay
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Potato_Tomato420's Achievements
Snitch (10/54)
4
Reputation
-
Thx all, i'm not that good at tables at the moment, still learning ? Also i'm aware that the resource wouldn't assign a nametag to new players, i'm still working on it. Thx for the help!
-
I'm currently making a custom nametag script for my server but i have a problem with showing the players wanted level. It shows the wanted level.. how could i fix this? local GUI = {} local label = {} local image = {} function showCustomNametag (sResource) if sResource == getThisResource() then local players = getElementsByType ("player") for i, player in ipairs (players) do GUI.i = dgsCreate3DInterface (-2631.4, 609, 13.45, 1, 0.5, 200, 100, tocolor(255,255,255,255), 0, 1, 0) if localPlayer == player then dgsSetVisible (GUI.i, false) end dgsSetProperty (GUI.i, "maxDistance", 10) dgsSetProperty (GUI.i, "fadeDistance", 7) dgs3DInterfaceAttachToElement (GUI.i, player, 0, 0, 1) local bg = dgsCreateImage (0, 0, 1, 0.2, nil, true, GUI.i, tocolor(0,0,0,255)) label.i = dgsCreateLabel (0, 0, 200, 15, getPlayerName (player), false, GUI.i) table.insert (label, label.i) dgsSetProperty (label.i , "textColor", tocolor(255,255,255,255)) dgsSetProperty (label.i , "alignment", {"center", "top"}) dgsSetProperty (label.i , "font", textH1) if getPlayerWantedLevel (player) > 0 then image.i = dgsCreateImage (0, 20, 200, 20, "assets/images/wantedLevel/"..getPlayerWantedLevel (player)..".png", false, GUI.i) table.insert (image, image.i) end setElementData (player, "playerNametagID", i) end end end addEventHandler ("onClientResourceStart", root, showCustomNametag) function updateNick(name) local ID = getElementData (localPlayer, "playerNametagID") dgsSetText (label[ID], name) end addEvent ("SAnametag:updateNick", true) addEventHandler ("SAnametag:updateNick", localPlayer, updateNick)
-
I agree it would be awesome if the made MTA for the remasterd opcoming GTA SA But i understand it would be a lot of work
-
Hi all, Is it possible to force a burrito to have cargo inside the loading area?
-
So I want to create moving vehicles and walking peds in a scene. For example a intro movie/scene for a new player. What's the best way to make this possible? Edit: Found something on the community
-
Thx!! Got it working I created a function to check if the lineOfSightClear is clear from any object and then triggerServerEvent to spawn the vehicle.
-
Hi all, is it possible to detect a gta world object within a colshape? For example: can i create a colshape in front of the player and then use isElementWithinColShape to detect if there is anyting inside the col? Even a object from the game itself? I have created a vehicle shop with a control panel to spawn purchased vehicles. But i have a little problem with the spawning part. I use getElementPosition to detect the players x, y, z and the createVehicle (x, y, z). But now i can spawn a vehicle inside a wall. To prevent this from happening i want to create a colShape in front of the player and then check if there are any element withing the colShape, so also walls from the game itself. Somebody any idea how i could detect this or resolve it? (Sorry for my english i know it's not great)
-
Thx! Probably did something wrong with updating Error is gone now! Thx!
-
Hi all, i get the following error everytime my script is running at the exact line. I have no idea what i'm doing wrong and how i could fix it. I only get this error at the first run of the script, when the blur screen shows up. The second time i run my script then the error won't show up. Only at the first run of the script. I tried updating the dgs resource but still got the error. Thanks! Debug: WARNING: dgs/Core/imageslia:176: Bad argument @ 'dxGetMaterialSize' [Expected material at atgument 1, got dxcustomrender] My code: (The line i think that causes this debug line) Code from: https://wiki.multitheftauto.com/wiki/DgsCreateBlurBox Dgs line:
-
Already thought it was inpossible, Thx!
-
Does somebody know if it is possible to rotate a col shape? I tried using setElementRotation but then i found this isn't possible on the wiki page Is there some other way to set the rotation for a col cuboid?
-
Custom download screen on player join
Potato_Tomato420 replied to Potato_Tomato420's topic in Scripting
Sorry for the late reply! Thx! -
I was wondering if it is possible to create a custom download screen when a new players joins the server. Now i have the default download GUI/ transfer box when a players join the server. What is the best way to hide this Transfer box and create a custom download screen?
-
How can i disable the shaders? The code below doesn't same to work Very new to this stuff function triggerWorldEffects(state) for i = 1, #texturesimg do if not (shader) then local shader = dxCreateShader("worldEffects/shader/shader.fx") engineApplyShaderToWorldTexture(shader, texturesimg[i][2]) dxSetShaderValue(shader, "gTexture", dxCreateTexture(texturesimg[i][1])) elseif (shader) then engineRemoveShaderFromWorldTexture (shader, texturesimg[i][2]) end end end
-
Update: already soleved This seems to work: (Line 3, 4 and 5 added) function onColHit (hitElement, matchingDim) if (hitElement == localPlayer) and (matchingDim) then if (getElementData (hitElement, "warpedPoliceDepartment") == false) then setElementData (hitElement, "warpedPoliceDepartment", 0) end if (source == enterCol) and (getElementData (hitElement, "warpedPoliceDepartment") == 0) then setElementData (hitElement, "warpedPoliceDepartment", 1) setElementInterior (hitElement, 6) setElementDimension (hitElement, 1) setElementPosition (hitElement, 246.79, 63.06, 1003.64) elseif (source == exitCol) and (getElementData (hitElement, "warpedPoliceDepartment") == 0) then setElementData (hitElement, "warpedPoliceDepartment", 1) setElementInterior (hitElement, 0) setElementDimension (hitElement, 0) setElementPosition (hitElement, 1555.16, -1675.62, 16.2) end end end addEventHandler("onClientColShapeHit", getRootElement(), onColHit)