Jump to content

onClientGUIClick


Recommended Posts

كودي

كلنت

addEventHandler("onClientGUIClick", root, 
function() 
    if(source == i1) then 
triggerServerEvent("spawn",localPlayer) 
end 
end) 

سيرفر

addEvent("spawn",true) 
  
addEventHandler("spawn",root, 
  
function () 
  
outputChatBox("...", source, 255, 0, 0, true) 
spawnPlayer (source, 1794.5008544922, math.random(1334.1871337891,1336.1871337891), 6.7346267700195, 123) 
setElementModel ( source, 30 ) 
  
end) 

Link to comment
-- Client Side # 
addEventHandler ( "onClientGUIClick", i1, 
    function ( ) 
        if ( isPlayerDead ( localPlayer ) ) then 
            triggerServerEvent ( "spawn", localPlayer, One ) 
        else 
            triggerServerEvent ( "spawn", localPlayer, Two ) 
        end 
    end, false 
) 

-- Server Side # 
addEvent ( "spawn", true ) 
addEventHandler ( "spawn", root, 
    function ( theNumber ) 
        if ( theNumber == One ) then 
            outputChatBox ( "...", client, 255, 0, 0, true ) 
            spawnPlayer ( client, 1794.5008544922, math.random ( 1334.1871337891, 1336.1871337891 ), 6.7346267700195, 123, 30 ) 
            addPedClothes ( client, "...", "...", ... ) -- عبي الفراغات بالملابس إلي تبيها 
        else 
            outputChatBox ( "...", client, 255, 0, 0, true ) 
            setElementPosition ( client, 1794.5008544922, math.random ( 1334.1871337891, 1336.1871337891 ), 6.7346267700195 ) 
            setElementModel ( client, 30 ) 
            addPedClothes ( client, "...", "...", ... ) -- عبي الفراغات بالملابس إلي تبيها 
        end 
    end 
) 

وهنا رابط قائمة الملابس ، عشان تعرف أسماء وأرقام الملابس ذذ : https://wiki.multitheftauto.com/wiki/CJ_Clothes

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