Jump to content

تصحيح كود


Recommended Posts

السلام عليكم ورحمه الله و بركاته

انا سويت كود اذا مات اللاعب ينسحب من فلوسه 100

بس ما اشتغل هذا الكود

function TMFN () 
givePlayerMoney ( source, -100 ) 
outputChatBox ( "#C0C0C0You have been withdrawn #FF0000$ 100 #C0C0C0for you died" ) 
end 
addEventHandler ( "onPlayerWasted",getRootElement(),TMFN 

وين الخطا . :)

Link to comment
    function TMFN () 
    givePlayerMoney ( source, -100 ) 
    outputChatBox ( "#C0C0C0You have been withdrawn #FF0000$ 100 #C0C0C0for you died" ) 
    end 
    addEventHandler ( "onPlayerWasted",getRootElement(),TMFN ) 

يمقن كذا ؟؟؟

Link to comment
-- سيرفر 
function TMFN () 
takePlayerMoney(source,100) 
outputChatBox ( "#C0C0C0You have been withdrawn #FF0000$ 100 #C0C0C0for you died",source,255,0,0,true ) 
end 
addEventHandler ( "onPlayerWasted",getRootElement(),TMFN) 

كذآ لو كانت فلوس اللاعب أقل من 100 رح يسحبهآ , وتصير فلوس اللاعب بالسسآلب

، يصصير كذآ

^ -- Server Side !

function TMFN ( ) 
    if getPlayerMoney ( source ) >= 100 then 
        takePlayerMoney ( source, 100 ) 
        outputChatBox ( "#C0C0C0You have been withdrawn #FF0000$ 100 #C0C0C0for you died", source, 255, 0, 0, true ) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, TMFN ) 

كذآ يصير إذا كانت فلوس اللاعب أكبر أو تساوي 100 يسحب الفلوس أما إذا اقل من مية ما يسحب , عشان لا تصير الفلوس بالسسآلب .. #

Edited by Guest
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...