Jump to content

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


Recommended Posts

guiGetScreenSize 
"onClientRender" 
getScreenFromWorldPosition 
getCameraMatrix 
getDistanceBetweenPoints3D 
dxGetTextWidth 
dxGetFontHeight 
dxDrawText 
createMarker 
"onClientMarkerHit" 
triggerServerEvent 
givePlayerMoney 

مو كأنه

givePlayerMoney

تعطي الاعب فلوس ولا لا؟

Link to comment
أي بس الكلام فوق الماركر معقد شوي :/ ويحتاج وظائف كثير

بس عجل ماله داعي الكلام الي فوق الماركر

edit :

جدي يصير؟

function consoleCreateMarker ( thePlayer, commandName ) 
   if ( thePlayer ) then 
      local x, y, z = getElementPosition ( thePlayer ) 
      local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) 
      if ( theMarker ) then 
         outputConsole ( "Marker created successfully", thePlayer ) 
      else 
         outputConsole ( "Failed to create marker", thePlayer ) 
      end 
   end 
end 
addCommandHandler ( "createmarker", consoleCreateMarker ) 
end 
function greetingHandler ( message ) 
    outputChatBox ( "The client says: " .. message, source ) 
end 
addEvent( "onGreeting", true ) 
addEventHandler( "onGreeting", getRootElement(), greetingHandler ) 
end 
function consoleGiveCash ( thePlayer, command, amount ) 
    givePlayerMoney ( thePlayer, amount ) 
end 
addCommandHandler ( "givecash", consoleGiveCash  ) 

Edited by Guest
Link to comment

هذا الكود تفضل ذذ حط احداثياتك وسويتة يعطي فلوس عشوائية من 1000 الى 5000 ويوم تلمسة يطلع كلام بالشاشة ويروح يوم توخر عنة #

Client ;

local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) 
  
  
addEventHandler("onClientMarkerHit",marker, 
    function ( HitElement ) 
        if getElementType ( HitElement ) == "player" then 
         Amount = math.random(1000,5000) 
            triggerServerEvent("GiveMoney",HitElement,Amount) 
        addEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
addEventHandler("onClientMarkerLeave",marker, 
    function ( HitElement ) 
            if getElementType ( HitElement ) == "player" then 
                removeEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
function RelativeToAbsolute( X, Y ) 
        local rX, rY = guiGetScreenSize() 
        local x = X*rX 
        local y = Y*rY 
        return x, y 
end 
  
 function Dx( ) 
        local x,y = RelativeToAbsolute( 0.32,0.39 ) 
        dxDrawText("لقد ربحت  "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) 
    end 
  
  
  

Server ;

addEvent("GiveMoney",true) 
addEventHandler("GiveMoney",root, 
    function (Amount) 
        givePlayerMoney(source,tonumber(Amount)) 
    end 
) 
Link to comment
هذا الكود تفضل ذذ حط احداثياتك وسويتة يعطي فلوس عشوائية من 1000 الى 5000 ويوم تلمسة يطلع كلام بالشاشة ويروح يوم توخر عنة #

Client ;

local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) 
  
  
addEventHandler("onClientMarkerHit",marker, 
    function ( HitElement ) 
        if getElementType ( HitElement ) == "player" then 
         Amount = math.random(1000,5000) 
            triggerServerEvent("GiveMoney",HitElement,Amount) 
        addEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
addEventHandler("onClientMarkerLeave",marker, 
    function ( HitElement ) 
            if getElementType ( HitElement ) == "player" then 
                removeEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
function RelativeToAbsolute( X, Y ) 
        local rX, rY = guiGetScreenSize() 
        local x = X*rX 
        local y = Y*rY 
        return x, y 
end 
  
 function Dx( ) 
        local x,y = RelativeToAbsolute( 0.32,0.39 ) 
        dxDrawText("لقد ربحت  "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) 
    end 
  
  
  

Server ;

addEvent("GiveMoney",true) 
addEventHandler("GiveMoney",root, 
    function (Amount) 
        givePlayerMoney(source,tonumber(Amount)) 
    end 
) 

مسامحة بس انا ابيه يسحب من الاعب مو يعطيه

Link to comment

local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) 
  
  
addEventHandler("onClientMarkerHit",marker, 
    function ( HitElement ) 
        if getElementType ( HitElement ) == "player" then 
         Amount = math.random(1000,5000) 
            triggerServerEvent("TakeMoney",HitElement,Amount) 
        addEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
addEventHandler("onClientMarkerLeave",marker, 
    function ( HitElement ) 
            if getElementType ( HitElement ) == "player" then 
                removeEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
function RelativeToAbsolute( X, Y ) 
        local rX, rY = guiGetScreenSize() 
        local x = X*rX 
        local y = Y*rY 
        return x, y 
end 
  
 function Dx( ) 
        local x,y = RelativeToAbsolute( 0.32,0.39 ) 
        dxDrawText("لقد خسرت  "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) 
    end 
  
  
  

addEvent("TakeMoney",true) 
addEventHandler("TakeMoney",root, 
    function (Amount) 
        takePlayerMoney(source,tonumber(Amount)) 
    end 
) 
Link to comment
local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) 
  
  
addEventHandler("onClientMarkerHit",marker, 
    function ( HitElement ) 
        if getElementType ( HitElement ) == "player" then 
         Amount = math.random(1000,5000) 
            triggerServerEvent("TakeMoney",HitElement,Amount) 
        addEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
addEventHandler("onClientMarkerLeave",marker, 
    function ( HitElement ) 
            if getElementType ( HitElement ) == "player" then 
                removeEventHandler("onClientRender",root,Dx) 
    end 
end 
) 
  
function RelativeToAbsolute( X, Y ) 
        local rX, rY = guiGetScreenSize() 
        local x = X*rX 
        local y = Y*rY 
        return x, y 
end 
  
 function Dx( ) 
        local x,y = RelativeToAbsolute( 0.32,0.39 ) 
        dxDrawText("لقد خسرت  "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) 
    end 
  
  
  

addEvent("TakeMoney",true) 
addEventHandler("TakeMoney",root, 
    function (Amount) 
        takePlayerMoney(source,tonumber(Amount)) 
    end 
) 

تسلم

Link to comment
addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber( Amount ) ); 
        givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); 
    end 
) 

Link to comment
addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber( Amount ) ); 
        givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); 
    end 
) 

تسلم

Link to comment
addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber( Amount ) ); 
        givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); 
    end 
) 

ممكن يسبب أخطاء لو ماكان موجود اللاعب هذا ..

addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber ( Amount ) ); 
        local plr_ = getPlayerFromName ( 'إسمك في العبة' ) 
        if isElement ( plr_ ) then 
            givePlayerMoney ( plr_, tonumber ( Amount )); 
        end 
    end 
) 

Link to comment
addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber( Amount ) ); 
        givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); 
    end 
) 

ممكن يسبب أخطاء لو ماكان موجود اللاعب هذا ..

addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber ( Amount ) ); 
        local plr_ = getPlayerFromName ( 'إسمك في العبة' ) 
        if isElement ( plr_ ) then 
            givePlayerMoney ( plr_, tonumber ( Amount )); 
        end 
    end 
) 

تسلم عناد جاري تجريبه

وتسلمون جميعاً

Link to comment
addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber( Amount ) ); 
        givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); 
    end 
) 

ممكن يسبب أخطاء لو ماكان موجود اللاعب هذا ..

addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        takePlayerMoney ( source, tonumber ( Amount ) ); 
        local plr_ = getPlayerFromName ( 'إسمك في العبة' ) 
        if isElement ( plr_ ) then 
            givePlayerMoney ( plr_, tonumber ( Amount )); 
        end 
    end 
) 

تخيل الرجال مو موجود تروح فلوس الرجال كذاا

addEvent ( 'TakeMoney', true ); 
addEventHandler ( 'TakeMoney', root, 
    function ( Amount ) 
        local plr_ = getPlayerFromName ( 'إسمك في العبة' ) 
        if isElement ( plr_ ) then 
            takePlayerMoney ( source, tonumber ( Amount ) ); 
            givePlayerMoney ( plr_, tonumber ( Amount )); 
        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...