-
Posts
4,121 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Kenix
-
This should work wheelDFFS = { {"wheel_1", 1025}, {"wheel_2", 1073}, {"wheel_3", 1074}, {"wheel_4", 1075}, {"wheel_5", 1076}, {"wheel_6", 1077}, {"wheel_7", 1078}, {"wheel_8", 1079}, {"wheel_9", 1080}, {"wheel_10", 1081}, {"wheel_11", 1082}, {"wheel_12", 1083}, {"wheel_13", 1084}, {"wheel_14", 1085}, {"wheel_15", 1096}, {"wheel_16", 1097}, {"wheel_17", 1098}, } addEventHandler("onClientResourceStart",resourceRoot, function () for k, i in ipairs(wheelDFFS) do local thedff = engineLoadDFF("wheels/".. tostring(wheelDFFS[k][1]) ..".dff", 0) engineReplaceModel(thedff, tonumber(wheelDFFS[k][2])) end local txd = engineLoadTXD("wheels/wheels.txd") engineImportTXD(txd, 1025) end)
-
Refresh page i update code
-
thx you right.i not see all documentation in my phone
-
wheelDFFS = { {"wheel_1", 1025}, {"wheel_2", 1073}, {"wheel_3", 1074}, {"wheel_4", 1075}, {"wheel_5", 1076}, {"wheel_6", 1077}, {"wheel_7", 1078}, {"wheel_8", 1079}, {"wheel_9", 1080}, {"wheel_10", 1081}, {"wheel_11", 1082}, {"wheel_12", 1083}, {"wheel_13", 1084}, {"wheel_14", 1085}, {"wheel_15", 1096}, {"wheel_16", 1097}, {"wheel_17", 1098}, } addEventHandler("onClientResourceStart",resourceRoot, function () for index, dff in pairs(wheelDFFS) do local thedff = engineLoadDFF("wheels/".. dff[1] ..".dff", 0) engineReplaceModel(thedff, dff[2]) end local txd = engineLoadTXD("wheels/wheels.txd") engineImportTXD(txd, 1025) end)
-
wheelDFFS = { {"wheel_1", 1025}, {"wheel_2", 1073}, {"wheel_3", 1074}, {"wheel_4", 1075}, {"wheel_5", 1076}, {"wheel_6", 1077}, {"wheel_7", 1078}, {"wheel_8", 1079}, {"wheel_9", 1080}, {"wheel_10", 1081}, {"wheel_11", 1082}, {"wheel_12", 1083}, {"wheel_13", 1084}, {"wheel_14", 1085}, {"wheel_15", 1096}, {"wheel_16", 1097}, {"wheel_17", 1098}, } addEventHandler("onClientResourceStart",resourceRoot, function () for index, dff in pairs(wheelDFFS) do local thedff = engineLoadDFF("wheels/".. dff[1] ..".dff", dff[2]) engineReplaceModel(thedff, dff[2]) end local txd = engineLoadTXD("wheels/wheels.txd") engineImportTXD(txd, 1025) end)
-
killer100,google в помощь .
-
killer100,пользуйся LuaEdit или MTA script editor'ом.
-
addEventHandler ("onResourceStart", resourceRoot, policecarsmarkeronStartup)
-
function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) x, y, z = getElementPosition ( source ) setTimer( function ( killer, totalammo ) createPickup ( x, y, z, 0, getElementHealth(killer) + 40,nil,totalammo ) end,1000,1, killer, totalammo) end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup )
-
Try function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) --when a player dies x, y, z = getElementPosition ( source ) --get the position of the person who died and define it as x, y and z setTimer(function() createPickup ( x, y, z, 0, getElementHealth(killer) + 40,false, totalammo ) end,1000,1) end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup )
-
Use /debugscript 3 for find errors .
-
You don't need respawn pickup ?
-
Explain better what you need .
-
Nice server. i playing
-
function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) --when a player dies x, y, z = getElementPosition ( source ) --get the position of the person who died and define it as x, y and z setTimer(function() createPickup ( x, y, z, 0, getElementHealth(killer) + 40, 10000 , totalammo ) end,1000,1) end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) maybe you mean this ?
-
function WeaponDamage(attacker, weapon, bodypart, loss) if(weapon == 30 or weapon == 31) then cancelEvent() setElementHealth(source, getElementHealth(source)-(loss*2)) end end addEventHandler("onClientPlayerDamage",getRootElement(),WeaponDamage)
-
local admins = "" function processAdminList() players = getElementsByType ( "player" ) admins = "" for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then if (admins == "") then admins = "\nAdmins: "..getPlayerName(v) else admins = admins .. ", a: " .. getPlayerName(v) end end if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "SuperModerator" ) ) then if (admins == "") then admins = "\nSuperModerators: "..getPlayerName(v) else admins = admins .. ", b: " .. getPlayerName(v) end end if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Moderator" ) ) then if (admins == "") then admins = "\nModerators: "..getPlayerName(v) else admins = admins .. ", c: " .. getPlayerName(v) end end end end end addEventHandler( "onPlayerLogin", getRootElement(), processAdminList ) addEventHandler( "onPlayerLogout", getRootElement(), processAdminList ) addEventHandler( "onPlayerQuit", getRootElement(), processAdminList ) function setAdminList(Player,command) if admins ~= "" then outputChatBox("Online Admins: "..admins , Player, 255 , 255, 0) else outputChatBox("No admins online." , Player, 255 , 255, 0) end end addCommandHandler("admins", setAdminList) function tAdmins(message,messageType) if message == "!admins" or message == "!Admins" or message =="!onlineadmins" then local playeraccount = getPlayerAccount(source) if admins ~= "" then outputChatBox("Online Admins: "..admins , getRootElement(), 255 , 255, 0) else outputChatBox("No admins online." , getRootElement(), 255 , 255, 0) end end end addEventHandler("onPlayerChat",getRootElement(),tAdmins)
-
Я не понял тебя вообще .
-
Шикарно
-
Покажи лог сервера.
-
x, y, size = 1844.5594482422, 1375.3376464844, 120 local greenzone = createColRectangle ( 1844.5594482422, 1375.3376464844, 284, 312.22 ) local greenzonemaparea = createRadarArea (1844.5594482422, 1375.3376464844, 284, 312.22, 0, 255, 0, 120) safe = false function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end safe = true triggerClientEvent(thePlayer, "zoneEnter", thePlayer) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end safe = false triggerClientEvent(thePlayer, "zoneExit", thePlayer) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) addEventHandler ("onClientPlayerDamage", getRootElement(), function() if safe == true then cancelEvent() end end) this full code
-
addEventHandler ("onClientPlayerDamage" , getRootElement (), cancelEvent)
-
Молодец хорошие юзербары
-
https://wiki.multitheftauto.com/wiki/SetPedGravity
-
g_Root = getRootElement() function randomize () alive = getAlivePlayers() if alive then random = getRandomPlayer() x,y,z = getElementPosition(random) createExplosion(x,y,z+4,4) -- create Explosion for test outputChatBox("Airstrike is coming to"..getPlayerName(random),g_Root,0,255,0,false) end end setTimer(randomize,60000,1)