-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
https://wiki.multitheftauto.com/wiki/Projectiles 58 Flare from hydra (doesn't work)
-
Executing javascript from an iframe in the browser
ViRuZGamiing replied to alberto2345's topic in Scripting
executeBrowserJavascript Examples; https://github.com/Jusonex/mtasa_cef_tools/blob/master/webui/src/WebWindow.lua#L180-189 https://github.com/Jusonex/mtasa_cef_tools/blob/master/webui/src/mtaevents.js#L9-L15 -
my bad, didn't read the question properly
-
function setWantedLevel(player, wanted) if (getPlayerWantedLevel(player) > wanted) then setPlayerWantedLevel(player, wanted) end end This will increased the current wanted level, I think the deal is that you wouldn't want the wanted level to lower when set lower but be higher when set higher
-
setVehicleDoorState setVehicleWheelStates setVehicleLightState Is the only thing I know. Not sure if you can change the damage model
-
For interactive browser look at guiCreateBrowser instead of createBrowser
-
Just thinking logically wouldn't it be better to destroy and create it client sided?
-
createVehicle is a predefined function "Stack overflow" means that this function has been calling itself without actually finishing execution of the first call. It's like infinite loop.
-
I think this has to do with text going outside your label container. Try wordwrapping it. guiLabelSetHorizontalAlign
-
oh yeah source is the marker, my bad
-
triggerServerEvent ( "takeJob", source) You trigger the event for root
-
setTimer requires a function and setElementData has no parameters. setTimer(function(thePlayer) setElementData(thePlayer, "isPlayerMuted", false) end, 1000, 1, thePlayer)
-
WARNING: Bad Argument @ Forum Post [Expected script got Nil] 'Cant debug without the code' but you haven't specified a SQL Connection
-
It does work when you change the StreamMethod to 2 in the Meta.xml in <settings>
-
<data name="position" type="coord3d" default="1900,200,18" /> I suppose
-
i need your help about just criminals can turf
ViRuZGamiing replied to LilDawage's topic in Scripting
if ( player and isElement ( player ) and getElementType ( player ) == "player" and not isPedInVehicle ( player ) and getTeamName(getPlayerTeam(player)) == "Criminals" ) then -
I suppose this would be enough: function isSerialBanned(s) serial = exports.NGSQL:db_exec("SELECT * FROM bans WHERE srl=?", s) if serial then return true end return false end
-
Your code is shorter indeed but the difference is, Analogue example: You're in a store and want 10 things, you: For each question do Look for a worker and ask where you Can find 1 thing. While you could ask all 10 items in 1 time. It's a performance difference
-
What I'd do then is create a col and attach it to the car. Rotate as the car rotates.
- 14 replies
-
- getelementboundingbox
- vehicle
-
(and 1 more)
Tagged with:
-
So if I understand right, and you understand my drawing skill of paint The red is what you can get from the function but you also want to get the blue value to get the purple box in total
- 14 replies
-
- getelementboundingbox
- vehicle
-
(and 1 more)
Tagged with:
-
oh yeah my bad didn't notice. I see what you mean. local x, y = guiGetScreenSize() --can be at the top since your screensize won't change during runtime local message = false local r, g, b function notification() dxDrawRectangle(x/2-800/2, 0, 800, 50, tocolor(0, 0, 0, 220), false, false) dxDrawText(message, 0, 15, x, y, tocolor(r, g, b, 220), 1, "default", "center", "top", false, false, true) end function sendClientMessage(message, r, g, b, colorCode) message = tostring(message) if not message then return end r,g ,b = tonumber(r), tonumber(g), tonumber(b) if not colorCode then colorCode = false else colorCode = true r,g,b = getColorFromString(message) end addEventHandler("onClientRender", root, notification) setTimer(function() removeEventHandler("onClientRender", root, notification) message = false end, 5000, 1) end addEvent("sendClientMessage", true) addEventHandler("sendClientMessage", root, sendClientMessage) Try this
-
db_query? don't you mean dbQuery? https://wiki.multitheftauto.com/wiki/DbQuery
-
Can you copy the error cause I don't really understand your error? I suppose expect string but got nil value?
-
ClientEvent not added client-side error (but event is there)
ViRuZGamiing replied to koragg's topic in Scripting
You're doing the same thing as before tho, onClientRender is every frame so dxDrawBday is called again and again so will setTimer be as well. Don't put the setTimer inside the render you're creating multiple timers this could be the lagg problem