Jump to content

xerox8521

Members
  • Posts

    4
  • Joined

  • Last visited

Details

  • Gang
    Cops
  • Location
    Germany
  • Interests
    Scripting with LUA in MTA

xerox8521's Achievements

Vic

Vic (3/54)

0

Reputation

  1. So im experienting with MTA and Lua and noticed that setRadioChannel(0) didnt work for me at first so i added it in the onClientPlayerRadioSwitch event which works but causes a C Stack Overflow. addEventHandler("onClientPlayerRadioSwitch",getRootElement(),function() local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle) then if(getElementModel(vehicle) == 432) then setRadioChannel(0) cancelEvent() end end end) Edit it seems it doesnt matter which radio number you enter and it doesnt matter if you cancel the event or not
  2. OK, but the problem i have is that the debug messages dont get printed at all like its never called from mta. I am testing this in a client script
  3. Hi, OnClientVehicleDamage does it get called when a vehicle is created server side or only client side vehicles ? Does a player have to be inside the vehicle to make OnClientVehicleDamage get called ? if server side aswell can someone check if OnClientVehicleDamage is being called using this code? I dont get any debug message even i used debugscript 3 function OnPlayerVehicleDamage(attacker, weapon, loss , x, y, z, tire) outputDebugString(getPlayerName(attacker) .. " " .. getWeaponNameFromID(weapon) .. " " .. loss) outputDebugString(tostring(x) .. " " .. y .. " " .. z .. " " .. tire) end addEventHandler("onCientVehicleDamage",getRootElement(),OnPlayerVehicleDamage)
  4. Hi, i had the idea why not adding team friendlyfire as optional argument when you use createTeam. As we already have colors friendly fire could be added aswell example: team createTeam(string name,[int r, int g, int b, bool friendlyfire])
×
×
  • Create New...