Jump to content

طلب كود بخصوص ساحة


BadBoy

Recommended Posts

السلام عليكم ورحمة الله وبركاتة ,,

كيفكم ان شاء الله طيبين ,,

ي شباب بغيت كود انو ساحة ممنوعة من الزومبي ,,

وبغيت كود انو لو شخص قتل زومبي يحصل فلوس ,,

ننتظركم ..

Link to comment

هذا حق لما تقتل الزومبي يجيك فلوس

exports.scoreboard:addScoreboardColumn('Zombie kills') 
  
addEvent("onZombieWasted",true) 
addEventHandler("onZombieWasted",root, 
function (killer) 
    givePlayerMoney(killer,50) 
    addPlayerZombieKills(killer) 
  
end) 
  
  
function addPlayerZombieKills(killer) 
    local account = getPlayerAccount(killer) 
    if isGuestAccount(account) then return end 
    local zombieKills = getAccountData(account,"Zombie kills") 
    if not zombieKills then setAccountData(account,"Zombie kills",0) end 
    setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) 
end 
  
  
addEventHandler("onPlayerLogin",root, 
function () 
    local account = getPlayerAccount(source) 
    if isGuestAccount(account) then return end 
    local zombieKills = getAccountData(account,"Zombie kills") 
    if zombieKills then 
        setElementData(source,"Zombie kills",tostring(zombieKills)) 
    else 
        setElementData(source,"Zombie kills",0)     
  
end 
end) 

_____________________________________________________________________________________

هذا مود حق ساحة الزومبي ( يمنع الزومبي عن منطقة )

http://arabsh.com/files/0c374d4964f1/an ... e-zip.html

Link to comment

هذا حق لما تقتل الزومبي يجيك فلوس

exports.scoreboard:addScoreboardColumn('Zombie kills') 
  
addEvent("onZombieWasted",true) 
addEventHandler("onZombieWasted",root, 
function (killer) 
    givePlayerMoney(killer,50) 
    addPlayerZombieKills(killer) 
  
end) 
  
  
function addPlayerZombieKills(killer) 
    local account = getPlayerAccount(killer) 
    if isGuestAccount(account) then return end 
    local zombieKills = getAccountData(account,"Zombie kills") 
    if not zombieKills then setAccountData(account,"Zombie kills",0) end 
    setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) 
end 
  
  
addEventHandler("onPlayerLogin",root, 
function () 
    local account = getPlayerAccount(source) 
    if isGuestAccount(account) then return end 
    local zombieKills = getAccountData(account,"Zombie kills") 
    if zombieKills then 
        setElementData(source,"Zombie kills",tostring(zombieKills)) 
    else 
        setElementData(source,"Zombie kills",0)     
  
end 
end) 

_____________________________________________________________________________________

هذا مود حق ساحة الزومبي ( يمنع الزومبي عن منطقة )

http://arabsh.com/files/0c374d4964f1/an ... e-zip.html

Link to comment
# بالنسسبةة للسساحةة

https://community.multitheftauto.com/in ... ls&id=2513

# لأحدأثيأت المنطقةة x,y,z بدل احداثيات

اخوي المود هذه جربته قام شو يعمل ,,

لين شخص شخصيته 280 يقتله وهو اصلن موب زومبي ,,

هذه الاكواد الي داخله اتمنى احد يفيدنا ^^ ,,

safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) 
setElementData (safeZoneRadar, "zombieProof", true) 
  
  
function enterZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
      if ( skin == 287 ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) 
       else 
         killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) 
 if not ( skin == 287 )  then 
  killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 
Link to comment
safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) 
setElementData (safeZoneRadar, "zombieProof", true) 
  
  
function enterZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
      if ( skin == 280 ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) 
       else 
         killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) 
 if not ( skin == 280 )  then 
  killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

Link to comment
# بالنسسبةة للسساحةة

https://community.multitheftauto.com/in ... ls&id=2513

# لأحدأثيأت المنطقةة x,y,z بدل احداثيات

اخوي المود هذه جربته قام شو يعمل ,,

لين شخص شخصيته 280 يقتله وهو اصلن موب زومبي ,,

هذه الاكواد الي داخله اتمنى احد يفيدنا ^^ ,,

safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) 
setElementData (safeZoneRadar, "zombieProof", true) 
  
  
function enterZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
      if ( skin == 287 ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) 
       else 
         killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) 
 if not ( skin == 287 )  then 
  killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

local SkinAllowJoin = 280                | --- هنا بدل الـ رقم الششخصيةة للشخصية اللي تبيها تقدر تدخل 
  
safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) 
setElementData (safeZoneRadar, "zombieProof", true) 
  
  
function enterZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
  if ( skin == SkinAllowJoin ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) 
 else 
      killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
    local skin = getElementModel (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) 
 if not ( skin == SkinAllowJoin )  then 
      killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 
Link to comment
safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) 
setElementData (safeZoneRadar, "zombieProof", true) 
  
  
function enterZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
      if ( skin == 280 ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) 
       else 
         killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) 
 if not ( skin == 280 )  then 
  killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

ماضبط الزومبي يجو ويقتلوني

Link to comment
safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) 
setElementData (safeZoneRadar, "zombieProof", true) 
  
  
function enterZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
      if ( skin == 280 ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) 
       else 
         killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) 
 if not ( skin == 280 )  then 
  killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

ماضبط الزومبي يجو ويقتلوني

# ججربت حقي ؟

Link to comment
safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) 
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) 
setElementData (safeZoneRadar, "zombieProof", true) 
  
  
function enterZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
      if ( skin == 280 ) then 
    toggleControl (hitPlayer, "fire", true ) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) 
       else 
         killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeHit", safecol, enterZone ) 
  
function leaveZone(hitPlayer,thePlayer) 
local skin = getElementModel (hitPlayer) 
    toggleControl (hitPlayer, "fire", true) 
    toggleControl (hitPlayer, "aim_weapon", true) 
    toggleControl (hitPlayer, "vehicle_fire", true) 
    outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) 
 if not ( skin == 280 )  then 
  killPed (hitPlayer) 
end 
end 
addEventHandler( "onColShapeLeave", safecol, leaveZone ) 

ماضبط الزومبي يجو ويقتلوني

# ججربت حقي ؟

لا رايح اجربه مشفته ض1 ..

Link to comment

ي شباب اكوادكم ضابطه معليش مسامحة ,,

بس كان معي اخطاء بالحداثيات بالكول لاكن انا عملت ماركر افضل ذذ ,,

طيب واجهة مشكلة الحين لمن يخرج من الماركر الاعب موب راضي يروح عنه ,,

toggleControl 

debugscript 3 : WARING: Anti-Zombie/anti-zombie-area.lua:24 Bad 'player' pointer @ "toggleControl"(1)

WARING: Anti-Zombie/anti-zombie-area.lua:25 Bad 'player' pointer @ "toggleControl"(1)

WARING: Anti-Zombie/anti-zombie-area.lua:26 Bad 'player' pointer @ "toggleControl"(1)

addEventHandler("onMarkerLeave",root, 
function () 
if ( source == marker ) then 
    toggleControl (source, "fire", true) 
    toggleControl (source, "aim_weapon", true) 
    toggleControl (source, "vehicle_fire", true) 
       end 
   end 
) 
Link to comment
addEventHandler("onMarkerLeave", root, 
function(player) 
    if (source == marker) then 
        if getElementType(player) == "player" then 
            toggleControl(player, "fire", true) 
            toggleControl(player, "aim_weapon", true) 
            toggleControl(player, "vehicle_fire", true) 
        end 
    end 
end) 
  

Link to comment
addEventHandler("onMarkerLeave", root, 
function(player) 
    if (source == marker) then 
        if getElementType(player) == "player" then 
            toggleControl(player, "fire", true) 
            toggleControl(player, "aim_weapon", true) 
            toggleControl(player, "vehicle_fire", true) 
        end 
    end 
end) 
  

نفس المشلكة و نفس الكلام في ( debugscript3 ) ,,

ض1 هذه الكود كامل ,,

addEventHandler("onResourceStart",resourceRoot, 
function() 
safecol = createMarker(2521.6000976563,-1665.0999755859,1.8000001907349,"cylinder",100,255,0,0,0) 
safeZoneRadar = createRadarArea ( 2477.7438964844,-1721.6513671875, 150, 120, 0, 255, 0 ) 
setElementData (safecol, "zombieProof", true) 
 setRadarAreaFlashing ( safeZoneRadar, true ) 
 end 
 ) 
  
addEventHandler("onMarkerLeave", root, 
function(player) 
    if (source == marker) then 
        if getElementType(player) == "player" then 
            toggleControl(player, "fire", true) 
            toggleControl(player, "aim_weapon", true) 
            toggleControl(player, "vehicle_fire", true) 
        end 
    end 
end) 
  
  
addEventHandler("onMarkerHit",root, 
function(hitPlayer) 
local skin = getElementModel (hitPlayer) 
if ( source == safecol ) then 
    toggleControl (hitPlayer, "fire", false) 
    toggleControl (hitPlayer, "aim_weapon", false) 
    toggleControl (hitPlayer, "vehicle_fire", false) 
 if not ( skin == 0 )  then 
  killPed (hitPlayer) 
end 
end 
end 
) 
  
Link to comment

safecol اسم الماركر حقك

في سطر 12 marker ليه حاطه

الخطأ احتمال انه لانك ما تحققت من نوع الألمنت الي دخل الماركر

+

تأكد انك سويت ريستارت للمود بعد ما ركبت الكود

Link to comment
safecol اسم الماركر حقك

في سطر 12 marker ليه حاطه

الخطأ احتمال انه لانك ما تحققت من نوع الألمنت الي دخل الماركر

+

تأكد انك سويت ريستارت للمود بعد ما ركبت الكود

لو تحققت يمكن تواجهني مشكلة ان الزومبي مايموت ذذ

+ تسلم انحلت المشكلة

Link to comment

اها الحين فهمت ليه تتحقق من رقم الشخصية و تقتل

الكود المفروض يكون كذا

لان الزومبي بيد

elseif تقدر تستخدم

addEventHandler("onMarkerHit", root, 
function(player) 
    if (source == safecol) then 
        if getElementType(player) == "player" then 
            toggleControl(player, "fire", false) 
            toggleControl(player, "aim_weapon", false) 
            toggleControl(player, "vehicle_fire", false) 
        elseif getElementType(player) == "ped" and getElementData(player, "zombie") then 
            killPed(player) 
        end 
    end 
end) 

Link to comment
اها الحين فهمت ليه تتحقق من رقم الشخصية و تقتل

الكود المفروض يكون كذا

لان الزومبي بيد

elseif تقدر تستخدم

addEventHandler("onMarkerHit", root, 
function(player) 
    if (source == safecol) then 
        if getElementType(player) == "player" then 
            toggleControl(player, "fire", false) 
            toggleControl(player, "aim_weapon", false) 
            toggleControl(player, "vehicle_fire", false) 
        elseif getElementType(player) == "ped" and getElementData(player, "zombie") then 
            killPed(player) 
        end 
    end 
end) 

مشكووور :mrgreen:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...