Jump to content

جدول سيارات


Recommended Posts

function markerHit (hitPlayer, matchingDimension) 
  if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then 
 if (getAccountData(hitPlayer,"ro5sa") == "yes") then 
 if getElementType (hitPlayer) == "player" then 
    triggerClientEvent ("viewGUI", hitPlayer) 
    setCameraMatrix ( hitPlayer, 548.46484375, -1267.1435546875, 26.682792663574, 496.4482421875,-1342.6044921875,-13.315231323242, 0, 0) 
    setElementDimension(hitPlayer,755) 
    end 
  end 
 else 
       outputChatBox ("ليس لديك ؟؟؟", hitPlayer, 255, 0, 0, false) 
end 
end 
addEventHandler ("onMarkerHit", getRootElement(), markerHit) 

هذا هو

Link to comment

-- Server Side # 
addEventHandler ('onMarkerHit', resourceRoot,function(hitPlayer) 
    local acc = getPlayerAccount(hitPlayer) 
        if getElementType (hitPlayer) == 'player'  and acc and not isGuestAccount(acc) then 
            if ( getAccountData(acc,'ro5sa') == 'yes') then 
                    triggerClientEvent (hitPlayer,'viewGUI', hitPlayer) 
                        setCameraMatrix ( hitPlayer, 548.46484375, -1267.1435546875, 26.682792663574, 496.4482421875,-1342.6044921875,-13.315231323242, 0, 0) 
                        setElementDimension(hitPlayer,755) 
        else 
                    outputChatBox ('ليس لديك ؟؟؟', hitPlayer, 255, 0, 0, false) 
            end 
        end 
    end 
) 

الكود راح يكون لكل الماركرات بالسيرفر , اذا ما تبي كذا سوي شرط يتحقق من الماركرات الي تبيها

الي طرحتها تحتاج تسوي تحققات بسيطه setAccountData بالنسبه لـ

-- Server Side # 
addEventHandler ('onMarkerHit',marker2, 
function (plr) 
      local playeraccount = getPlayerAccount (plr) 
        if ( getElementType(plr) == 'player' ) and not getAccountData(playeraccount,'ro5sa') and ( playeraccount ) and not ( isGuestAccount(playeraccount) ) then 
            setAccountData ( playeraccount, 'ro5sa', 'yes' ) 
        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...