Ibra Posted August 6, 2015 Share Posted August 6, 2015 السلام عليكم الله لايهينكم وأدري ازعجتكم بالطلبات لكن مبتدأ احتاج كود اللي لما يضغط الـ لاعب على بوتون يموت .. يعني لما أنا أضغط على بوتون مكتوب فيه ( KILL ) أموت علطول وششششششكراً Link to comment
Simple. Posted August 7, 2015 Share Posted August 7, 2015 onClientGUIClick triggerServerEvent killPed or setElementHealth Link to comment
Naif Posted August 7, 2015 Share Posted August 7, 2015 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
i S6O Posted August 7, 2015 Share Posted August 7, 2015 -- طيب وش الفرق بين ؟ setElementHealth or killPed Link to comment
Naif Posted August 7, 2015 Share Posted August 7, 2015 ^ killPed < يقتل اللاعب آو البيد انت تحدد ^ setElementHealth < يعطي اللاعب أو الـ elemnt صحه يعني يستخدم الي يبي Link to comment
TAPL Posted August 7, 2015 Share Posted August 7, 2015 -- طيب وش الفرق بين ؟ setElementHealth or killPed setElementHealth تقدر تستخدمه بالكلينت عشان تخلي اللوكل بلاير يموت killPed ذا سيرفر فقط و رح يحتاج تريقر Link to comment
iMr.SFA7 Posted August 7, 2015 Share Posted August 7, 2015 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
TAPL Posted August 7, 2015 Share Posted August 7, 2015 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
~Mr.Hassan Posted August 7, 2015 Share Posted August 7, 2015 -- طيب وش الفرق بين ؟ 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
~Mr.Hassan Posted August 7, 2015 Share Posted August 7, 2015 addEventHandler ( "onClientGUIClick", root, function () if ( source == [Name.Button] ) then setElementHealth (thePlayer , 0 ) end end ) Link to comment
0m4r Posted August 7, 2015 Share Posted August 7, 2015 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
TAPL Posted August 7, 2015 Share Posted August 7, 2015 ^ وش فيكم ؟ عطيته الكود ! الشباب حبو يشاركون بالمسابقة Link to comment
0m4r Posted August 7, 2015 Share Posted August 7, 2015 ^ وش فيكم ؟ عطيته الكود ! م انتبهت للكود حقك 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