Jump to content

طلب تصحيح كود


XPro

Recommended Posts

الكود هو لما اكتب كلمة في اف 8 يصيرو الاعبين ما يقدرو يقتلوني

function nodie ( attacker, weapon, bodypart,player ) 
local serial = getPlayerSerial ( player ) 
if ( serial == AADF5CA9EA8CE4576A3C202F571E93F4  ) then 
if ( attacker ) then 
cancelEvent() 
end 
 end 
 end 
 addCommandHandler("godon",nodie) 
 addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), nodie ) 

Link to comment

خلص ضبطتو هو اني خليتو يتعرف على السريال في السيرفر و اذا تعرف عليه سويت تريقر للكلنت يتعرف عليه مره اخرى و ييصرو ما يقدرو يقتلوني

Link to comment

#Example:

-- Client Side 
Serials = { 
    [ 'AADF5CA9EA8CE4576A3C202F571E93F4' ] = true, 
} 
  
function OnAttcked ( attacker, weapon, bodypart ) 
    if Serials [ getPlayerSerial( localPlayer ) ] then 
        addEventHandler ( 'onClientPlayerDamage', localPlayer, cancelEvent ) 
        triggerServerEvent ( 'NoDamage', localPlayer ) 
    end 
end 
  
addCommandHandler ( 'godon', OnAttcked ) 

-- Server Side 
  
addEvent ( 'NoDamage', true ) 
addEventHandler ( 'NoDamage', root, 
    function ( ) 
        addEventHandler ( 'onPlayerDamage', root, cancelEvent ) 
    end 
) 
Link to comment
#Example:

-- Client Side 
Serials = { 
    [ 'AADF5CA9EA8CE4576A3C202F571E93F4' ] = true, 
} 
  
function OnAttcked ( attacker, weapon, bodypart ) 
    if Serials [ getPlayerSerial( localPlayer ) ] then 
        addEventHandler ( 'onClientPlayerDamage', localPlayer, cancelEvent ) 
        triggerServerEvent ( 'NoDamage', localPlayer ) 
    end 
end 
  
addCommandHandler ( 'godon', OnAttcked ) 

-- Server Side 
  
addEvent ( 'NoDamage', true ) 
addEventHandler ( 'NoDamage', root, 
    function ( ) 
        addEventHandler ( 'onPlayerDamage', root, cancelEvent ) 
    end 
) 

الآيفينت

onPlayerDamage 

ما يتكنسل !

وليه عرفت

attacker, weapon, bodypart 

وما آستخدمتهم ؟؟

Link to comment

مدري ليه استخدمتهم لانهم مكتوبين بـ صفحه الانفنت بـ الويكي

+ خلاص الكود شغال

-- Client Side 
Serials = { 
    [ 'AADF5CA9EA8CE4576A3C202F571E93F4' ] = true, 
} 
  
function OnAttcked ( attacker, weapon, bodypart ) 
    if Serials [ getPlayerSerial( localPlayer ) ] then 
        addEventHandler ( 'onClientPlayerDamage', localPlayer, cancelEvent ) 
    end 
end 
  
addCommandHandler ( 'godon', OnAttcked ) 
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...