-
Posts
1,102 -
Joined
Everything posted by Enargy,
-
Maybe the font size provided was not created to be used to a very large size, afaik.
-
multiply the value x, y the dxDrawTextand multiply it by the two variants X, Y. which calculates the resolution.
-
--simple code: local screenX, screenY = guiGetScreenSize() -- getting my screen size local myScreenX, myScreenY = 1024, 768 -- the resolution you use. in my case is 1024x768 X, Y = (screenX/myScreenX), (screenX/myScreenY) -- calculating the size of my screen with my resolution. syntax: dxDrawText("PLN "..getPlayerMoney(getLocalPlayer()), X*814, Y*40, 100, 100, tocolor(255, 255, 255, 255), 1.50, "pricedown", "center", "center", false, false, false, false, false)
-
I didnt see that, my wrong.
-
You will have to run the serverside function. use triggerClientEvent; E.g: ---SERVER addCommandHandler("createweapon", function (thePlayer, command) local x,y,z = getElementPosition(thePlayer) x = x + 5 triggerClientEvent(thePlayer, "onCreateWeapon", getRootElement(), x, y, z) end ) ---CLIENT addEvent("onCreateWeapon", true) addEventHandler("onCreateWeapon", getRootElement(), function (x, y, z) local weapon = createWeapon("minigun", x, y, z) end)
-
EDIT:(not tested). --- SERVER addEvent("openteams.getPlayersFromAccounts", true) addEventHandler("openteams.getPlayersFromAccounts", getRootElement(), function() local team = getPlayerTeam(source) if team then --CODE local allAccounts = getAccounts() for _, account in ipairs(getAccounts()) do if getTeamName(team) == getAccountData(account, "openteams.team.name") then local playerName = getAccountData(account, "openteams.account.name") triggerClientEvent(source, "openteams.getPlayersFromAccounts.serverGave", source, playerName) end end --END CODE end end) ---CLIENT local playerTable = {} addEvent("openteams.getPlayersFromAccounts.serverGave", true) addEventHandler("openteams.getPlayersFromAccounts.serverGave", getRootElement(), function(pName) guiGridListClear(teamPlayersGrid) table.insert(playerTable, {pName}) for index, player in ipairs(playerTable) do local row = guiGridListAddRow(teamPlayersGrid) guiGridListSetItemText(teamPlayersGrid, row, 1, player, false, false) getPlayerRow[players] = row end end)
-
start with something easier than this, not what difficult as MySQL, SQL, tables
-
Maybe if you increase the font size could found (it helped me); local sw,sh = guiGetScreenSize() scaleX,scaleY = 1/1920*sw, 1/1080*sh size = 1.50*scaleY
-
Pon la coma ',' entre element y blip.
-
function setteam() local team = getTeamFromName("Iveco Drivers") if team then setPlayerTeam (source,team) else local noteam = getTeamFromName ("Iveco Drivers") if noteam then cancelEvent() end end end addEvent("thekeem", true) addEventHandler("thekeem", root,setteam)
-
Its amazing
-
EDIT: you can also insert skin in a table; skin = {} addEventHandler("onPlayerWasted", root, function() local playerSkin = tonumber(getElementModel(source)) table.insert(skin, {playerSkin}) outputChatBox("inserted skin!", source) end) addEventHandler("onPlayerSpawn", root, function() for index, playerModel in pairs(skin) do setElementModel(source, unpack(playerModel)) table.remove( skin, index ) outputChatBox("loaded skin!", source) end end)
-
Puedes hacer que cuando no haya ningún texto en el editBox pues que establezca uno por si solo; E.j local precio_de_marihuana = "$1000" addEventHandler("onClientGUIChanged", root, function() local texto = guiGetText(editBox) if ( texto:len() == 0 ) then guiSetText(editBox, precio_de_marihuana) end end)
-
local theCode = 'outputChatBox("loaded")' what's this? what did you mean with this?
-
EDIT: takePlayerMoney it works to take the amount of money which player has. use givePlayerMoney instead of takePlayerMoney.
-
you can use Notepad++ for write your own codes. Anyways, to this type of script you can try with; createObject setElementData addCommandHandler
-
If you did in another topic with your respective questions... why did you copy the same thing about this https://forum.multitheftauto.com/viewtopic.php?f=122&t=85763&p=776781#p776781 PD:things are learned to make the attempt but not others do it for you
-
No es necesario agregar una puerta con el editor de mapas; mas bien usa createObject como te lo indica en el segundo código, simplemente sería copiar dos veces el mismo código pero con definiciones diferentes.
-
Some errors in debugscript? Im at the phone
-
Seria mucho mejor si no se viera el efecto de disparo y reemplazar el arma como la de un arma laser o algo así. pero bueno avance
-
function reloadtazerclient (weapon, ammo, ammoInClip) if (weapon == 34) then triggerServerEvent ( "ontazershoot", localPlayer ) end end addEventHandler ( "onClientPlayerWeaponFire", localPlayer, reloadtazerclient ) what it does reloadPedWeapon is reload all weapons owned by the player, not one.