ghassen2 Posted August 31, 2016 Share Posted August 31, 2016 هلا شباب لو سمحتم عندي كود بس ما حاب يشتغل client side function JetpackGive () triggerServerEvent ( "onJetpack",localPlayer) end addEventHandler ( "onClientGUIClick", GUIEditor.button[5] , JetpackGive, false ) Server side function JetpackGive ( ) local hasJetPack = doesPedHaveJetPack ( source ) outputChatBox ("[VIP]You are got or deleted jetpack",source,255,255,0,false) if ( hasJetPack ) then removePedJetPack ( source ) else givePedJetPack ( source ) end end end addEvent( "onJetpack", true ) addEventHandler( "onJetpack", getRootElement(), JetpackGive ) Link to comment
iMr ~ MnHmAr Posted August 31, 2016 Share Posted August 31, 2016 function JetpackGive ( ) local hasJetPack = doesPedHaveJetPack ( source ) outputChatBox ("[VIP]You are got or deleted jetpack",source,255,255,0,false) if ( hasJetPack ) then removePedJetPack ( source ) else givePedJetPack ( source ) end end addEvent( "onJetpack", true ) addEventHandler( "onJetpack", getRootElement(), JetpackGive ) كان فيه آند زآيده في سطر -10- بي ملف السيرفر Link to comment
</Mr.Tn6eL> Posted August 31, 2016 Share Posted August 31, 2016 كودك طويل ومافي داعي المسافات تفضل كود قصير addEvent("onJetpack", true) addEventHandler("onJetpack", root, function( ) _G[(doesPedHaveJetPack(source) and "remove" or "give").."PedJetPack"](source) outputChatBox("[VIP]You are "..(doesPedHaveJetPack(source) and "got" or "deleted").." jetpack", source, 255, 255, 0) end) Link to comment
ghassen2 Posted August 31, 2016 Author Share Posted August 31, 2016 شكراااااا شباب المود الأشتغل 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