-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Where's teamVehicles table?
-
-- client side: addEventHandler ( "onClientPedDamage", getRootElement(), function (attacker) if not attacker then return end if ( getElementType(source) == "ped" and getElementType(attacker) == "vehicle" ) then triggerServerEvent("killZombie",localPlayer,source) end end) -- server side: addEvent("killZombie",true) addEventHandler ( "killZombie", getRootElement (), function ( zombie ) if zombie and source then killPed ( zombie, source ) end end)
-
function playerQuit() local playerAcc = getPlayerAccount(source) if ( playerAcc ) then -- You we're checking if (playeraccount == true) then, but your variable name is "playeracc". local playerCash = getPlayerMoney(source) setAccountData(playerAcc, "cash", playerCash) setPlayerMoney(source, 0) end end addEventHandler("onPlayerQuit", getRootElement(), playerQuit) addEventHandler("onPlayerLogout", getRootElement(), playerQuit) function playerLogin() local playerAcc = getPlayerAccount(source) if (playerAcc) then local playerBank = getAccountData(playerAcc, "cash") if (playerBank) then setPlayerMoney(source, tonumber(playerBank)) else outputChatBox("You are broke.", source, 255, 0, 0) end end end addEventHandler("onPlayerLogin", getRootElement(), playerLogin)
-
Tank, If I would be you, I would post a screenshot of what the bug you showed me .
-
Aca tenes uno que cree, deberia funcionar: -- client.lua: local skins = {{"skin1", 46}, {"skin54", 53}} function load() for index, skin in pairs(skins) do txd = engineLoadTXD ( skin[1].. ".txd" ) engineImportTXD ( txd, skin[2] ) dff = engineLoadDFF ( skin[1].. ".dff", 0 ) engineReplaceModel ( dff, skin[2] ) end end addEventHandler("onClientResourceStart",resourceRoot, function () local version = getVersion() if string.find(version.mta, "1.1.1") then setTimer ( load, 1000, 1) end end) -- meta.xml: Supongo que sabes crear un recurso, verdad?
-
I wasn't trying to give him the full script, karlis, I'm trying to give him a code where to start of.
-
local weaponsThatCantFireBullets = {[0] = true, [1] = true, [2] = true, [3] = true, [4] = true, [5] = true, [6] = true, [7] = true, [8] = true, [9] = true, [10] = true, [11] = true, [12] = true, [13] = true, [14] = true, [15] = true, [16] = true, [40] = true, [44] = true, [45] = true, [46] = true} local lines = {} function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if weaponsThatCantFireBullets[weapon] then return end local mx, my, mz = getPedWeaponMuzzlePosition(source) lines[#lines +1] = {mx, my, mz, hitX, hitY, hitZ} end addEventHandler("onClientPlayerWeaponFire", root, onClientPlayerWeaponFireFunc) addEventHandler("onClientRender",root, function () for index, line in pairs(lines) do dxDrawLine3D(line[1],line[2],line[3],line[4],line[5],line[6],tocolor(255,0,0,255)) end end) Should be enough for a start.
-
The maximun health a player/ped can have is 200%.
-
Para remplazar skins necesitas saber algo de la programacion de LUA. Usa las funciones de "Engine" para conseguir esto. https://wiki.multitheftauto.com/wiki/Cli ... _functions
-
Could you put your code in LUA tags? Also, what error do you get?
-
De que skin hablas? de la interface grafica?
-
Your script is a total mess, you are using like 3 or more different variables for the player element, that'll never work. I suggest you to take a while to read your script and try to find out your error(s).
-
Qwert, what he want's is add borders to the DX text.
-
Well, I just told you to search for google api. P.S: Let's stop doing off-topic .
-
I wasn't talking about the GUI design, I was talking about the idea itself. P.S: I didn't gave you any link, that was sarcasm I guess .
-
can any Fix My Script Pleae Enter Here if you can
Castillo replied to ^Dev-PoinT^'s topic in Scripting
Yeah, that would be better, I agree. -
can any Fix My Script Pleae Enter Here if you can
Castillo replied to ^Dev-PoinT^'s topic in Scripting
You can use triggerServerEvent from client side and add it on server side to give the weapon. -
can any Fix My Script Pleae Enter Here if you can
Castillo replied to ^Dev-PoinT^'s topic in Scripting
Well, then I think the forum has to be updated, as the function color is YELLOW, it should be BLUE if was client & server function. -
Well, seems like my "Google translator" idea got already copied, but that doesn't make the idea legitim .
-
That's because it's nil. onClientColShapeHit doesn't return the radar area, because that's not possible, a col shape and a radar area are two different things.
-
can any Fix My Script Pleae Enter Here if you can
Castillo replied to ^Dev-PoinT^'s topic in Scripting
Ignition, giveWeapon are server only functions. -
Mira este recurso: https://community.multitheftauto.com/index.php?p= ... ils&id=298 usa esas funciones, asi tipo /fly /water /bunny y eso.
-
Pues, entonces lo hiciste mal (no es mala onda, es la verdad...), tenes alguna experiencia en programacion de LUA?
