Jump to content

#RooTs

Members
  • Posts

    1,990
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by #RooTs

  1. not work addEventHandler ( "onVehicleExplode", root, function ( ) if ( vehicle [ source ] ) then setTimer ( function ( ) destroyElement ( vehicle [ source ] ) vehicle [ source ] = nil end, 5000, 1, source ) end end )
  2. some error ? local vehicle = { } local markers = { { 1560.77563, -1605.14966, 12.38281, "cylinder", 2, 0, 0, 255, 35 }, { 1584.11853, -1604.97534, 12.38281, "cylinder", 2, 0, 0, 255, 35 }, { 1604.44885, -1622.20142, 12.51332, "cylinder", 2, 0, 0, 255, 35 }, { 1559, -1653, 30, "cylinder", 2, 0, 0, 255, 35 }, { 1559, -1697, 30, "cylinder", 2, 0, 0, 255, 35 }, } for _,v in ipairs ( markers ) do createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ], v [ 8 ], v [ 9 ] ) end addEvent ( "CreVehicePv", true ) addEventHandler ( "CreVehicePv", root, function ( id ) if ( isElement ( vehicle [ client ] ) ) then destroyElement ( vehicle [ client ] ) end local x, y, z = getElementPosition ( client ) vehicle [ client ] = createVehicle ( tostring ( id ) or 411, x + 2, y, z ) warpPedIntoVehicle ( client, vehicle [ client ] ) end ) addEventHandler ( "onMarkerHit", resourceRoot, function ( hitPlayer ) if ( getElementType ( hitPlayer ) == "player" ) and not ( isPedInVehicle ( hitPlayer ) ) then if ( getPlayerTeam ( hitPlayer ) == getTeamFromName ( "Policia" ) ) or ( getPlayerTeam ( hitPlayer ) == getTeamFromName ( "SWAT" ) ) then triggerClientEvent ( hitPlayer, "showGUIpv", hitPlayer ) else triggerClientEvent ( hitPlayer, "failvehcop", hitPlayer ) end end end ) addEventHandler ( "onVehicleExplode", root, function ( ) if ( vehicle [ source ] ) then setTimer ( function ( ) destroyElement ( vehicle [ source ] ) vehicle [ source ] = nil end, 5000, 1, source ) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( isElement ( vehicle [ source ] ) ) then destroyElement ( vehicle [ source ] ) vehicle [ source ] = nil end end )
  3. add setTimer in addEventHandler ( "onVehicleExplode", root, function ( ) if ( vehicle [ source ] ) then destroyElement ( vehicle [ source ] ) vehicle [ source ] = nil end end ) 5 seconds, please
  4. hello friends, I made a function to destroy the vehicle after 5 seconds. most did not succeed. I've tried with and without loop the loop function VehicleExplode() for k, v in pairs(vehicles) do if v == source then setTimer(function() destroyElement(vehicles[source]) vehicles[source] = nil end, 5000, 1, vehicles[source]) end end end addEventHandler("onVehicleExplode", root, VehicleExplode)
  5. But you were going to post it? stop create discussions here boy .. you not read? "maybe sell"
  6. Example Weapon Skin in client side --------------AK 47--------------------- txd = engineLoadTXD("armas/ak47.txd") engineImportTXD(txd, 355) dff = engineLoadDFF("armas/ak47.dff", 355) engineReplaceModel(dff, 355) ------------Desert eagle----------------------- txd = engineLoadTXD("armas/desert_eagle.txd") engineImportTXD(txd, 348) dff = engineLoadDFF("armas/desert_eagle.dff", 348) engineReplaceModel(dff, 348) --------------M4---------------------- txd = engineLoadTXD("armas/m4.txd") engineImportTXD(txd, 356) dff = engineLoadDFF("armas/m4.dff", 356) engineReplaceModel(dff, 356) -------------MP5----------------------- txd = engineLoadTXD("armas/mp5.txd") engineImportTXD(txd, 353) dff = engineLoadDFF("armas/mp5.dff", 353) engineReplaceModel(dff, 353) --------------shotgun---------------------- txd = engineLoadTXD("armas/chromegun.txd") engineImportTXD(txd, 349) dff = engineLoadDFF("armas/chromegun.dff", 349) engineReplaceModel(dff, 349) ---------------Sniper--------------------- txd = engineLoadTXD("armas/sniper.txd") engineImportTXD(txd, 358) dff = engineLoadDFF("armas/sniper.dff", 358) engineReplaceModel(dff, 358) ---------------shotgspa12--------------------- txd = engineLoadTXD("armas/shotgspa.txd") engineImportTXD(txd, 351) dff = engineLoadDFF("armas/shotgspa.dff", 351) engineReplaceModel(dff, 351) Example Weapon Sound in client side local function playGunfireSound(weaponID) local source = getLocalPlayer() local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source) local px, py, pz = getElementPosition ( source ) if weaponID == 22 then --colt45 local sound = playSound3D("sounds/weap/Colt45.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 23 then local sound = playSound3D("sounds/weap/Silenced.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 24 then--deagle local sound = playSound3D("sounds/weap/Deagle.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 25 then--shotgun local sound = playSound3D("sounds/weap/Shotgun.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 26 then--sawn-off local sound = playSound3D("sounds/weap/Sawed-Off.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 27 then--combat shotgun local sound = playSound3D("sounds/weap/Combat Shotgun.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 28 then--uzi local sound = playSound3D("sounds/weap/UZI.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 32 then--tec-9 local sound = playSound3D("sounds/weap/tec9.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 29 then--mp5 local sound = playSound3D("sounds/weap/MP5.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 30 then--ak47 local sound = playSound3D("sounds/weap/AK-47.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 31 then--m4 local sound = playSound3D("sounds/weap/M4.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 33 then--rifle local sound = playSound3D("sounds/weap/Rifle.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 34 then--sniper local sound = playSound3D("sounds/weap/Sniper.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weaponID == 16 then--grenade local sound = playSound3D("sounds/weap/Bomba.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) end end addEventHandler("onClientPlayerWeaponFire", root, playGunfireSound)
  7. Look Weapon Sound https://community.multitheftauto.com/in ... ls&id=2702 DownLoad pack Weapon Skin click here
  8. I deleted for the simple reason that I will post my script. and it was not so important this post/topic Look https://forum.multitheftauto.com/viewtopic.php?f=108&t=95729
  9. Yeah I know. I'm your fan, I would like to implement an idea further on the panel, but I do not know
  10. DX VEHICLE CONTROL PANEL - I accept suggestions and ideas Screen Shot Video Demo:
  11. stolen: https://community.multitheftauto.com/ind ... s&id=12523 original: https://community.multitheftauto.com/ind ... s&id=12024 DONE
  12. that was same it. since I removed the nonexistent group Thanks
  13. I managed to find the error. thank you friend @Revolt
  14. Yes, is server side <script src="s_godmode.lua" type="server"></script>
  15. hello guys, because it is giving bad argument in "isObjectInACLGroup" already I looked at several examples in WiFi, but could not solve local acls = { "Moderator", "S-Moderadora", "SuperModerator", "Admin","Console","Sub.dono" } addEventHandler( "onResourceStart", resourceRoot, function() for _,v in pairs(getElementsByType("player")) do bindKey(v, "2", "down", toggleGodMode) end end ) addEventHandler( "onPlayerJoin", root, function() bindKey(source, "2", "down", toggleGodMode) end ) function toggleGodMode(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) for _, k in pairs ( acls ) do if isObjectInACLGroup ("user."..accName, aclGetGroup(k)) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) else setElementData(thePlayer,"invincible",true) end break end end end
×
×
  • Create New...