Jump to content

Enargy,

Members
  • Posts

    1,102
  • Joined

Everything posted by Enargy,

  1. Enargy,

    Custom font

    Maybe the font size provided was not created to be used to a very large size, afaik.
  2. multiply the value x, y the dxDrawTextand multiply it by the two variants X, Y. which calculates the resolution.
  3. --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)
  4. I didnt see that, my wrong.
  5. 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)
  6. 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)
  7. start with something easier than this, not what difficult as MySQL, SQL, tables
  8. 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
  9. Pon la coma ',' entre element y blip.
  10. 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)
  11. 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)
  12. 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)
  13. Enargy,

    Question

    if you have depth is 3d and if not then 2d
  14. local theCode = 'outputChatBox("loaded")' what's this? what did you mean with this?
  15. EDIT: takePlayerMoney it works to take the amount of money which player has. use givePlayerMoney instead of takePlayerMoney.
  16. you can use Notepad++ for write your own codes. Anyways, to this type of script you can try with; createObject setElementData addCommandHandler
  17. 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
  18. 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.
  19. Some errors in debugscript? Im at the phone
  20. 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
  21. 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.
×
×
  • Create New...