-
Posts
230 -
Joined
-
Last visited
Everything posted by Banex
-
I do not understand how to use the variable, the two functions have the same variable, so if I use the variable of isPlayerMuted function, player.muted() without putting any argument as to whether the player is muted or not, I'll have a warning message in debugscript not to use the obligatory argument setPlayerMuted function?
-
I have seen that some variables in OOP are equal, such as these functions: https://wiki.multitheftauto.com/wiki/IsPlayerMuted https://wiki.multitheftauto.com/wiki/SetPlayerMuted I do not understand how this will work. Could someone explain to me please?
-
You can not call the function to the side of the client this way, and not add arguments that are not used in function use https://wiki.multitheftauto.com/wiki/OnClientPlayerJoin
-
or use SetEffectDensity
-
https://wiki.multitheftauto.com/wiki/Ge ... tsBySerial
-
Como remover a mensagem de ban predefinida?
Banex replied to joaosilva099's topic in Programação em Lua
Não, como o DNL291 já disse, você terá que criar seu próprio sistema de ban -
local Col = createColCuboid(1290.5771,2100,11.0156, 300, 100, 30) local pArea1 = createRadarArea( 1290.5771,2100,200, 150, 32, 32,32) bool = false function shapeHit( thePlayer ) givePlayerMoney (thePlayer , 1000 ) end addEventHandler('onColShapeHit', Col,shapeHit) function onWasted() if isElementWithinColShape( source, Col ) bool = true end end addEventHandler ( "onPlayerWasted", getRootElement(), onWasted ) function onSpawn() if bool then --setElementPosition end end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn )
-
setPedAnimationProgress
-
disabled = {'Team1', 'Team2'} addEventHandler("onPlayerChat", root, function (_, type) if (type == 2) then for k,v in pairs(disabled) do local team = getTeamFromName(v) if (team) then return cancelEvent() end end end end)
-
change encoding to UTF-8 without BOM
-
MySQL sería la mejor opción
-
local Words = { "FDP","mtasa://","fdp","gay","tnc","vtnc","Filha da puta","diferenciados","servidor lixo", "favelados","viado","vai se fuder","puta","porra","poha","cuzão","caralho","macaco","staff lixo", "putão","buceta","bct","Favelados","traveco","rola","pinto","vadia","cachorra","vtnc","FAVELADOS", "Diferenciados","DIFERENCIADOS","FDP","VIADO","VTNC","krl","viad.o","puta*","TNC","vagabunda", "porno",":O","cuzão" } function ins (msg , msgty) for k,v in pairs(Words) do if string.find ( msg,v ) then setTimer (setPlayerMuted, 60000, 1, source, false) setPlayerMuted (source,true) outputChatBox (getPlayerName(source)..' #FF0000Foi mutado por 1 minuto devido ao uso de linguagem inadequada.',getRootElement(),255,255,255,true) return end end end addEventHandler ("onPlayerChat",getRootElement(),ins)
-
does not change all fonts, only changes the font of the text that you created
-
looks awesome, good job!
-
I created this hud, intending to cite the download link for a model post in a forum of a gaming community. But I do not understand how can you say that an idea is stolen? It was you who created the HUD, much less the design. This is just a simple HUD, anyone who knows the basics of scripting can create it in minutes
-
MTA does not support ENB use shaders
-
Server max_lost_percent = 30 -- maximum allowed percent of lost packets function checkPacketLost() for i,v in ipairs ( getElementsByType("player")) do local lost = getNetworkStats(v).packetlossLastSecond if lost > max_lost_percent then kickPlayer ( v, "Big amount of lost packets" ) end end end addEvent("onDownloadFinish",true) addEventHandler("onDownloadFinish",root, function () setTimer(checkPacketLost,5000,0) end) Client addEventHandler ( "onClientFileDownloadComplete", getRootElement(), function () triggerServerEvent("onDownloadFinish",localPlayer) end)
-
createRadarArea toggleControl
-
of course it will not work if some variables are not set and you do not add events to the functions dx
-
try this: addEventHandler( 'onClientRender', root, function() for _, player in ipairs( getElementsByType( 'player') ) do if isElementOnScreen( player ) and getElementData( player, 'showImage' ) then local cx, cy, cz = getCameraMatrix() local vx, vy, vz = getPedBonePosition( player, 8 ) local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz ) local drawDistance = 70.0 local target = getPedTarget(localPlayer) if dist < drawDistance or player == target then if( isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) ) then x, y = getScreenFromWorldPosition (vx, vy, vz + 0.3) if(x and y) then dxDrawImage(x, y, x + 20, y + 20, "classicon_player.png" ) end end end end end end) Copy the code again
-
you are trying to create an image above the player's head?
-
Test yourself, if not working tell us what errors you have in /debugscript 3