EH10 Posted December 13, 2013 Share Posted December 13, 2013 ممكن كود اذا ضربت احد بسلاح الورده يزيد دمة ولازم تيم خاص يعني ابي وظيفة اذا صرت فيها ودخلت التيم ومعي سلاح الورده وضربت احد يزيد دمة وياخذ فلوس الي ضرب علية والي زاد دمة ينقص اعطوني انا بسوي الكود Link to comment
K1NG Posted December 13, 2013 Share Posted December 13, 2013 Event: "onClientPlayerDamage" getLocalPlayer getPlayerTeam getTeamName cancelEvent setElementHealth getElementHealth givePlayerMoney takePlayerMoney Link to comment
EH10 Posted December 13, 2013 Author Share Posted December 13, 2013 اسمع قلي الكود كامل خطا ولا الترتيب خطا وقلي الاكواد الصح addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), function ( attacker, weapon, bodypart, player ) if ( getPlayerTeam(source) ) and ( getTeamName(getPlayerTeam(source)) ) == "medic" then setElementHealth ( player, 100 ) getElementHealth ( player ) if ( weapon == 22 ) then givePlayerMoney ( player, 50 ) takePlayerMoney ( player, 40 ) cancelEvent () end end end) Link to comment
فاّرس Posted December 13, 2013 Share Posted December 13, 2013 (edited) addEventHandler ( 'onPlayerDamage', root,function ( attacker , weapon) if ( attacker ) and ( attacker ~= source ) and ( getElementType(attacker) == 'player' ) and ( weapon == 14 ) then if ( getPlayerTeam( attacker ) ) and ( getTeamName(getPlayerTeam( attacker )) == 'medic' ) then if ( getElementHealth(source) < 100 ) and ( getPlayerMoney( attacker ) >= 5000 ) then setElementHealth(source,100) givePlayerMoney(source,5000) takePlayerMoney(attacker,5000) end end end end) Edited December 14, 2013 by Guest Link to comment
EH10 Posted December 13, 2013 Author Share Posted December 13, 2013 addEventHandler ( 'onPlayerDamage', root,function ( attacker , weapon) if ( attacker ) and ( attacker ~= source ) and ( weapon == 14 ) then if ( getPlayerTeam( attacker ) ) and ( getTeamName(getPlayerTeam( attacker )) == 'medic' ) then if ( getElementHealth(source) < 100 ) and ( getPlayerMoney( attacker ) >= 5000 ) then setElementHealth(source,100) givePlayerMoney(source,5000) takePlayerMoney(attacker,5000) end end end end) المود ماضبط حطيتو كلينت Link to comment
AboShanab Posted December 14, 2013 Share Posted December 14, 2013 ^ سيرفر + يتاكد ان الهاجم عليه عنده 5000 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now