Jump to content

ممكن كود


Recommended Posts

  
local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0, 150) 
setTimer(function (thePlayer) 
  if isElementWithinMarker(thePlayer, marker) then 
  givePlayerMoney(thePlayer, 9000 ) 
 end 
end,120000,1) 
  

استبدل x,y,z الى الاحداثيات

لازم ولا لا MarkerHit ماشتغل لازم احط

Link to comment
  
local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0, 150) 
setTimer(function () 
  if isElementWithinMarker(localPlayer, marker) then 
  givePlayerMoney(localPlayer, 9000 ) 
 end 
end,120000,1) 
  

استبدل x,y,z الى الاحداثيات

bool givePlayerMoney ( int amount )

Note: Using this function client side (not recommended) will not change a players money server side.

Link to comment
  
local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0, 150) 
setTimer(function () 
  if isElementWithinMarker(localPlayer, marker) then 
  givePlayerMoney(localPlayer, 9000 ) 
 end 
end,120000,1) 
  

استبدل x,y,z الى الاحداثيات

bool givePlayerMoney ( int amount )

Note: Using this function client side (not recommended) will not change a players money server side.

تم التعديل مشكور ع الملاحظة : )

Link to comment

local marker = createMarker(-700.14441,953.89948,12.34014, "cylinder", 1.5, 255, 0, 0, 150) 
  
addEventHandler('onMarkerHit',marker,function(playerHit) 
    if getElementType(playerHit) == 'player' then 
        setTimer(function() 
            if isElementWithinMarker(playerHit,marker) then  
                givePlayerMoney(playerHit,9000) 
                end 
            end,120000,0,playerHit) 
        end 
    end 
) 
Link to comment

جرب ذا الكود ولا تنسى تعدل احداثيات الماركر

local Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0) 
local times = {} 
  
addEventHandler("onMarkerHit",Marker, 
    function (element) 
        if getElementType(element) == "player" and not isPedInVehicle(element) then 
            if not times[element] and not isTimer(times[element]) then 
                times[element] = setTimer( 
                    function (player) 
                        givePlayerMoney(player,9000) 
                    end 
                ,10000,0,element) 
            end 
        end 
    end 
) 
  
addEventHandler("onMarkerLeave",Marker, 
    function (element) 
        if getElementType(element) == "player" then 
            if times[element] and isTimer(times[element]) then 
                killTimer(times[element]) 
                times[element] = nil 
            end 
        end 
    end 
) 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if times[source] and isTimer(times[source]) then 
            killTimer(times[source]) 
            times[source] = nil 
        end 
    end 
) 
  

Edited by Guest
Link to comment
جرب ذا الكود ولا تنسى تعدل احداثيات الماركر
local Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0) 
local times = {} 
  
addEventHandler("onMarkerHit",Marker, 
    function (element) 
        if getElementType(element) == "player" and not isPedInVehicle(element) then 
            if not times[element] and not isTimer(times[element]) then 
                times[element] = setTimer( 
                    function (player) 
                        givePlayerMoney(player,9000) 
                    end 
                ,10000,0) 
            end 
        end 
    end 
) 
  
addEventHandler("onMarkerLeave",Marker, 
    function (element) 
        if getElementType(element) == "player" and not isPedInVehicle(element) then 
            if times[element] and isTimer(times[element]) then 
                killTimer(times[element]) 
                times[element] = nil 
            end 
        end 
    end 
) 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if times[source] and isTimer(times[source]) then 
            killTimer(times[source]) 
            times[source] = nil 
        end 
    end 
) 
  

مازبط

Link to comment
-- Server Side  
 Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0,255) 
 times = { }; 
  
addEventHandler("onMarkerHit",Marker, 
    function (element) 
        if getElementType(element) == "player" and not isPedInVehicle(element) then 
            if not times[element] and not isTimer(times[element]) then 
                times[element] = setTimer( 
                    function () 
                        givePlayerMoney(element,9000) 
                    end 
                ,10000,0) 
            end 
        end 
    end 
) 
  
addEventHandler("onMarkerLeave",Marker, 
    function (element) 
        if getElementType(element) == "player" and not isPedInVehicle(element) then 
            if times[element] and isTimer(times[element]) then 
                killTimer(times[element]) 
                times[element] = nil 
            end 
        end 
    end 
) 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if times[source] and isTimer(times[source]) then 
            killTimer(times[source]) 
            times[source] = nil 
        end 
    end 
) 
  

Edited by Guest
Link to comment
-- Server Side  
local Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0) 
local times = {} 
  
addEventHandler("onMarkerHit",Marker, 
    function (element) 
        if getElementType(element) == "player" and not isPedInVehicle(element) then 
            if not times[element] and not isTimer(times[element]) then 
                times[element] = setTimer( 
                    function () 
                        givePlayerMoney(element,9000) 
                    end 
                ,10000,0) 
            end 
        end 
    end 
) 
  
addEventHandler("onMarkerLeave",Marker, 
    function (element) 
        if getElementType(element) == "player" and not isPedInVehicle(element) then 
            if times[element] and isTimer(times[element]) then 
                killTimer(times[element]) 
                times[element] = nil 
            end 
        end 
    end 
) 
  
addEventHandler("onPlayerQuit",root, 
    function () 
        if times[source] and isTimer(times[source]) then 
            killTimer(times[source]) 
            times[source] = nil 
        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...