Jump to content

* هيلب مي :)


Ibra

Recommended Posts

السلام عليكم

الله لايهينكم وأدري ازعجتكم بالطلبات لكن مبتدأ :mrgreen:

احتاج كود اللي لما يضغط الـ لاعب على بوتون يموت ..

يعني لما أنا أضغط على بوتون مكتوب فيه ( KILL )

أموت علطول :)

وششششششكراً :)

Link to comment
  
addEventHandler('onClientGUIClick',root, 
function ( ) 
if ( source == kill ) then 
triggerServerEvent('kill',localPlayer) 
end 
 end 
) 
  
--- Server 
  
addEvent('kill',true) 
addEventHandler('kill',root, function ( ) 
killPed ( source ) 
end) 
  

Link to comment
  
addEventHandler('onClientGUIClick',root, 
function ( ) 
if ( source == kill ) then 
triggerServerEvent('kill',localPlayer) 
end 
 end 
) 
  
--- Server 
  
addEvent('kill',true) 
addEventHandler('kill',root, function ( ) 
killPed ( source ) 
end) 
  

 addEvent('kill',true) 
addEventHandler('kill',root, function ( player ) 
killPed ( player) 
end) 
  
Link to comment
  
addEventHandler('onClientGUIClick',root, 
function ( ) 
if ( source == kill ) then 
triggerServerEvent('kill',localPlayer) 
end 
 end 
) 
  
--- Server 
  
addEvent('kill',true) 
addEventHandler('kill',root, function ( ) 
killPed ( source ) 
end) 
  

 addEvent('kill',true) 
addEventHandler('kill',root, function ( player ) 
killPed ( player) 
end) 
  

نصيحة مني تفتح الويكي و تصحح معلوماتك عشان ما تعطي الناس معلومات مغلوطة

https://wiki.multitheftauto.com/wiki/TriggerServerEvent

Link to comment
--  طيب وش الفرق بين ؟ 
  
setElementHealth or killPed 

setElementHealth تقدر تستخدمه بالكلينت عشان تخلي اللوكل بلاير يموت

killPed ذا سيرفر فقط و رح يحتاج تريقر

  
addEventHandler('onClientGUIClick',root, 
function ( ) 
if ( source == kill ) then 
triggerServerEvent('kill',localPlayer) 
end 
 end 
) 
  
--- Server 
  
addEvent('kill',true) 
addEventHandler('kill',root, function ( ) 
killPed ( source ) 
end) 
  

 addEvent('kill',true) 
addEventHandler('kill',root, function ( player ) 
killPed ( player) 
end) 
  
Link to comment

Client :

        addEventHandler ( "onClientGUIClick", root, function () 
        if ( source == ButtonName ) then 
          triggerServerEvent("Kill",resourceRoot) 
        end 
        end) 

Server :

    function kl() 
    killPed(client) 
    end 
    addEvent("Kill",true) 
    addEventHandler("Kill",resourceRoot,kl) 

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