Jump to content

ممكن كود


Recommended Posts

Posted

سلام شباب بدي مود متال هادا المتال

ادا دخلت ماركر كل 2 دقيقة يعتيك 9 الف

ومتال جا فلوسي 92 الف وطلعت من الماركر ماراح يبعتي فلوس الى اذا كنت في الماركير

Posted

ماجربت الكود بس هل هو صح ام خطا

local GiveMoney = createMarker(1,2,3, "cylinder", 1.5, 255, 0, 0, 150) 
function () 
  setTimer ( givePlayerMoney, 10000, 1, 9000 ) 
  if isElementWithinMarker(thePlayer, GiveMoney) then 
 end 
end) 

الرجاء الجواب باسرع وقت

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

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

Edited by Guest
Posted
  
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 ماشتغل لازم احط

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

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

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

Posted
الفلوس كلنت وهميه.

ليه ما تسوي اذا لمس الماركر وتسوي تايمر داخل الحدث؟

سويت بس اذا طلع من الماركر يضل يوزع له كل 10 ثواني :(

Posted

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 
) 
Posted (edited)

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

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
Posted
جرب ذا الكود ولا تنسى تعدل احداثيات الماركر
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 
) 
  

مازبط

Posted (edited)
-- 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
Posted
-- 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 
) 
  

مايطلع الماركر ولا يعطيني فلوس

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