Jump to content

الي يضرب مصيره الموت ضض


3ssol

Recommended Posts

ماضبط

addEventHandler ( "onPlayerDamage", getRootElement (), 
function (attacker,player) 
    if ( getPlayerSerial(player)~="57891AD31F0DC576D66EB78199FE5FA2" )then 
        killPed ( player, attacker, attackerweapon, bodypart ) 
    end 
end) 

Link to comment

addEventHandler("onPlayerDamage",root, 
    function ( attacker, weapon, bodypart, loss ) 
        if ( attacker and attacker ~= source ) then 
            if ( getPlayerSerial ( source ) == "Your Serial" ) and ( weapon == ID ) then 
                killPed ( attacker ); 
            end; 
        end; 
    end 
) 
Link to comment

ماضبط

:\

   addEventHandler("onPlayerDamage",root, 
        function ( attacker, weapon, bodypart, loss ) 
            if ( attacker and attacker ~= source ) then 
                if ( getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) and ( weapon == 1) then 
                    killPed ( attacker ); 
                end; 
            end; 
        end 
    ) 

Link to comment

يمكن كذا

  addEventHandler("onPlayerDamage",root, 
        function ( attacker, weapon, bodypart, loss ) 
            if ( attacker and attacker ~= source ) then 
                if (getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) then 
                    killPed (attacker,nil,38)--38 السلاح الي يموت فيه الي ضربك 
                end 
            end 
        end) 

Link to comment

كود ضأوي غير صحيح وآتوقع يسبب لك مشآكل ,

شوف ذا سويته لك ,

Meta = Server ,

ID = 1  
Serial = '57891AD31F0DC576D66EB78199FE5FA2' 
addEventHandler('onPlayerDamage', root, 
function ( killer, weapon ) 
    if ( killer) and (killer ~= source ) then 
    if (getPlayerSerial( source ) == Serial ) and (weapon  == ID ) then 
    killPed(killer) 
 end 
 end 
 end 
) 

Link to comment

خلاص مشكورين ضبط

طيب شباب لو مثلا واحد ركب معي السياره وابي لما اكتب كلمه

ينزل من السياره كيف !

يعني مثل ماتقول يحذف من السياره

الاعب كانه ضغط انتر ونزل لوحده

Link to comment
onVehilceEnter --- عند دخول السيارة 
removePedFromVehicle -- لانزال الاعب 
addCommandHandler --- كتابة الكلمه في F8  
او --- 
  
onPlayerChat -- -عند كتابة في الشاه 
if (msg) == 'برا' then -- اذا الكلمه برا نزل الاعب 
removePedFromVehicle 

Link to comment
function kick (seat )  
    if (seat  == 1 ) then 
    removePedFromVehicle(source) 
    outputChatBox('You Have Been Remove By The Driver', source, 255, 0 ,0 ) 
end 
end 
addCommandHandler('out', kick) 

مآجربته جربه وشوف ,

Link to comment

تم التعديل #

---Client----- 
function max ( seat ) 
    if ( seat == 1 ) then 
    triggerServerEvent('Remove', localPlayer) 
end 
end 
addEventHandler('onClientVehicleEnter', root, max ) 
addCommandHandler('out', max ) 
  
---Server--------------- 
addEvent('Remove', true) 
addEventHandler('Remove', resourceRoot, 
function ( ) 
    removePedFromVehicle(source) 
end 
) 

Edited by Guest
Link to comment

ماكس كودك خطأ ,,^

جرب ,,

Client-Side :

function delete(CMD) 
    if ( CMD == "out" ) then 
    triggerServerEvent("Remove", localPlayer) 
end 
end 
addEventHandler("onClientVehicleEnter", root, delete) 

Server-Side :

function del( ) 
    removePedFromVehicle(source) 
end 
addEvent("Remove", true) 
addEventHandler("Remove", root, del) 
addEventHandler("onPlayerCommand", root, del) 
addCommandHandler("out", del) 

Link to comment

* Server

addEventHandler ( 'onPlayerChat', root, 
    function ( msg ) 
        if ( msg == 'برا' ) then 
            if ( isPedInVehicle ( source ) ) then 
                local vehicle = getPedOccupiedVehicle ( source ); 
                local driver = getVehicleOccupant ( vehicle, 0 ); 
                if driver == source then 
                    local passengers = getVehicleOccupants ( vehicle ); 
                    for seat,passenger in pairs ( passengers ) do 
                        if seat == 0 then return end 
                        removePedFromVehicle ( passenger ); 
                    end 
                end 
            end 
            cancelEvent ( ); 
        end 
    end 
) 

Link to comment
* Server
addEventHandler ( 'onPlayerChat', root, 
    function ( msg ) 
        if ( msg == 'برا' ) then 
            if ( isPedInVehicle ( source ) ) then 
                local vehicle = getPedOccupiedVehicle ( source ); 
                local driver = getVehicleOccupant ( vehicle, 0 ); 
                if driver == source then 
                    local passengers = getVehicleOccupants ( vehicle ); 
                    for seat,passenger in pairs ( passengers ) do 
                        if seat == 0 then return end 
                        removePedFromVehicle ( passenger ); 
                    end 
                end 
            end 
            cancelEvent ( ); 
        end 
    end 
) 

ماكس كودك خطأ ,,^

جرب ,,

Client-Side :

function delete(CMD) 
    if ( CMD == "out" ) then 
    triggerServerEvent("Remove", localPlayer) 
end 
end 
addEventHandler("onClientVehicleEnter", root, delete) 

Server-Side :

function del( ) 
    removePedFromVehicle(source) 
end 
addEvent("Remove", true) 
addEventHandler("Remove", root, del) 
addEventHandler("onPlayerCommand", root, del) 
addCommandHandler("out", del) 

شغال -_-

Link to comment
اما شغال حقي خخخخخخخخ

حقك خطأ لاكن سويت if CMD = 'out'

وانت حطا الايفنت حق سيارات

لازم يكون onPlayerCommand

توني جربت الكود طلع فيهه خطأ

تكتب أي امر لو حتى refresh ينزلك من السياره -_-

Link to comment
Client-Side :
function delete(CMD) 
    if ( CMD == "out" ) then 
    triggerServerEvent("Remove", localPlayer) 
end 
end 
addEventHandler("onClientVehicleEnter", root, delete) 

Server-Side :

function del( ) 
    removePedFromVehicle(source) 
end 
addEvent("Remove", true) 
addEventHandler("Remove", root, del) 
addEventHandler("onPlayerCommand", root, del) 
addCommandHandler("out", del) 

الحل تغير root

الى

resourceRoot وبس ,

X ._.

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