Jump to content

عندي مشكلة في مود الشنطة


Recommended Posts

ابي تضيفون الكود لما الشرطي يبي ياخذ الشنطة ما يقدر يقوله The Police Can't Take The Bag

وابي لما يكون راكب في سيارة ويروح فوقها ما يقدر ياخذها

addEventHandler("onMarkerHit",root, 
    function (player) 
        if ( source == mar ) then 
            if getElementType(player) == "player" then 
                local x,y,z = getElementPosition(player) 
                local data = getElementData(mar,"num") 
                local data = tonumber(data) 
                destroyElement(mar) 
                destroyElement(ob) 
                destroyElement(bl) 
                killTimer(time) 
                setElementData(player,"bag",true) 
                atBag = createObject(1210,x,y,z) 
                setElementData(atBag,"num",data) 
                exports.bone_attach:attachElementToBone(atBag,player,12,0,0.05,0.27,0,180,0) 
                bli = createBlipAttachedTo(player,17) 
            attachedMarker = createMarker(x, y, z, "corona", 1, 255, 0, 255, 150) 
            attachElements(attachedMarker, player, 0, 0, 0) 
                exports.guimessages:sendClientMessage("* #ffffff[ #ff0000" .. getPlayerName(player) .. "#ffffff ]#0069c7 Has Take The Bag",root,0,255,0,true) 
                marker = createMarker(mark[data][1],mark[data][2],mark[data][3],"cylinder",1.5,255,255,0,255,player) 
                marBli = createBlipAttachedTo(marker,12,2,255,0,0,255,0,99999.0,player) 
         end 
      end 
    end 
  end 
) 

Link to comment

تحقق من تيم اللاعب اذاكان شرطي طلع له كلام في الشات

بالنسبة حقت السياره استخدم التحقق

if isPedInVehicle ( theped ) then return end 

theped = غير معرفه لازم تعرفها بالفنكشن

Link to comment
addEventHandler("onMarkerHit",root, 
function (player) 
    if ( source == mar ) then 
        if getElementType(player) == "player" then 
            if isPedInVehicle(player) then return outputChatBox ( "ERROR", player, 255, 0, 0, true ) end -- اذا بسياره مايقدر ياخذها 
            if getTeamName( getPlayerTeam(player) ) == 'Police' then return outputChatBox ( "ERROR", player, 255, 0, 0, true ) end -- اذا شرطي مايقدر ياخذها 
            local x,y,z = getElementPosition(player) 
            local data = getElementData(mar,"num") 
            local data = tonumber(data) 
            destroyElement(mar) 
            destroyElement(ob) 
            destroyElement(bl) 
            killTimer(time) 
            setElementData(player,"bag",true) 
            atBag = createObject(1210,x,y,z) 
            setElementData(atBag,"num",data) 
            exports.bone_attach:attachElementToBone(atBag,player,12,0,0.05,0.27,0,180,0) 
            bli = createBlipAttachedTo(player,17) 
            attachedMarker = createMarker(x, y, z, "corona", 1, 255, 0, 255, 150) 
            attachElements(attachedMarker, player, 0, 0, 0) 
            exports.guimessages:sendClientMessage("* #ffffff[ #ff0000" .. getPlayerName(player) .. "#ffffff ]#0069c7 Has Take The Bag",root,0,255,0,true) 
            marker = createMarker(mark[data][1],mark[data][2],mark[data][3],"cylinder",1.5,255,255,0,255,player) 
            marBli = createBlipAttachedTo(marker,12,2,255,0,0,255,0,99999.0,player) 
        end 
    end 
end 
) 

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...