Jump to content

شباب عندي مشكله بل كود ادخلو


Recommended Posts

السلام عليكم شباب وش المشكله هنا

عملت كود دي اكس حطات بس يضغط على زر او البوتون يصير يدخن بس فيه غلط بل مود مدري وش

الكلنت

  
GUIEditor = { 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.button[1] = guiCreateButton(335, 368, 143, 54, "", false) 
        guiSetAlpha(GUIEditor.button[1], 0.00)     
    end 
) 
  
local sx,sy = guiGetScreenSize()  
    function Dx() 
        dxDrawRectangle(sx*0.3413,sy*0.3550,sx*0.3137,sy*0.2667)  
        dxDrawLine(284 - 1, 81 - 1, 284 - 1, 432, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(542, 81 - 1, 284 - 1, 81 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(284 - 1, 432, 542, 432, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(542, 432, 542, 81 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(284, 81, 258, 351, tocolor(135, 13, 13, 255), false) 
        dxDrawImage(287, 111, 251, 249, "1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) 
        dxDrawText("سعر الدخان 50 الف دولار المود من قبل مستر حسن", 284, 80, 541, 111, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) 
        dxDrawLine(336 - 1, 369 - 1, 336 - 1, 423, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(477, 369 - 1, 336 - 1, 369 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(336 - 1, 423, 477, 423, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(477, 423, 477, 369 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(336, 369, 141, 54, tocolor(101, 141, 5, 255), false) 
        dxDrawText("اخذ / take", 334, 368, 477, 422, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, false, false) 
    end 
--------------------------------------------------- 
addEventHandler ( "onClientGUIClick", root, 
function (  ) 
if source == GUIEditor.button[1] then 
triggerServerEvent("smoke",getLocalPlayer()) 
end 
end 
) 
------------------------------------------------ 
bindKey ( "F7", "down",  
function ()  
if removeEventHandler("onClientRender",root,Dx)  then   
removeEventHandler("onClientRender",root,Dx) 
showCursor(false)   
else  
addEventHandler("onClientRender",root,Dx)  
end  
end)   
  

السيرفر

addEvent("smoke", true) 
addEventHandler("smoke", root, 
 function  (  ) 
local x, y, z = getElementPosition ( thePlayer ) 
    local hassan = createObject ( 1485, 0, 0, 0 ) 
    attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 )  
    toggleControl ( thePlayer, "jump", false ) 
    toggleControl ( thePlayer, "sprint", false ) 
    toggleControl ( thePlayer, "crouch", false ) 
end 
) 

الميتا

    

Edited by Guest
Link to comment
--هذا لانه في ارقمنت ناقص 
  
  
addEvent("smoke", true) 
addEventHandler("smoke", root, 
 function  (  ) 
local x, y, z = getElementPosition ( thePlayer ) 
    local hassan = createObject ( 1485, 0, 0, 0 ) 
    attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) 
    toggleControl ( source, "jump", false ) 
    toggleControl ( source , "sprint", false ) 
    toggleControl ( source , "crouch", false ) 
end 
) 

Link to comment

addEvent("smoke", true) 
addEventHandler("smoke", root, 
 function  (thePlayer) 
local x, y, z = getElementPosition ( thePlayer ) 
    local hassan = createObject ( 1485, 0, 0, 0 ) 
    attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) 
    toggleControl ( thePlayer , "jump", false ) 
    toggleControl ( thePlayer , "sprint", false ) 
    toggleControl ( thePlayer , "crouch", false ) 
end 
) 
Edited by Guest
Link to comment
addEvent("smoke", true) 
addEventHandler("smoke", root, 
 function  (thePlayer) 
local x, y, z = getElementPosition ( thePlayer ) 
    local hassan = createObject ( 1485, 0, 0, 0 ) 
    attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) 
    toggleControl ( thePlaye , "jump", false ) 
    toggleControl ( thePlaye , "sprint", false ) 
    toggleControl ( thePlaye , "crouch", false ) 
end 
) 

ممكن سؤال ليش حاطط هنا انت

    toggleControl ( thePlaye , "jump", false )

    toggleControl ( thePlaye , "sprint", false )

    toggleControl ( thePlaye , "crouch", false )

ThePlaye??

مو

ThePlayer

Link to comment

ملاحظه اخذت الكود من مود ما لقيت فنكشن السيجاره فشفت مود مو مشفر حق التدخين اخذته وشفته مو مشفر اخذت الكود

function sigarette ( thePlayer, commandName ) 
    local x, y, z = getElementPosition ( thePlayer )  
    local sigarette = createObject ( 1485, 0, 0, 0 ) 
    attachElements ( sigarette, thePlayer, 0.05, 0, 0.7, 0, 45, 118 )  
    toggleControl ( thePlayer, "jump", false ) 
    toggleControl ( thePlayer, "sprint", false ) 
    toggleControl ( thePlayer, "crouch", false ) 
end 
addCommandHandler ( "smoke", sigarette ) 

Link to comment
addEvent("smoke", true) 
addEventHandler("smoke", root, 
 function  (thePlayer) 
local x, y, z = getElementPosition ( thePlayer ) 
    local hassan = createObject ( 1485, 0, 0, 0 ) 
    attachElements ( hassan, thePlayer, 0.05, 0, 0.7, 0, 45, 118 ) 
    toggleControl ( thePlayer , "jump", false ) 
    toggleControl ( thePlayer , "sprint", false ) 
    toggleControl ( thePlayer , "crouch", false ) 
end 
) 
Link to comment

addEvent("smoke", true) 
addEventHandler("smoke", root, 
function () 
local x, y, z = getElementPosition ( source ) 
local hassan = createObject ( 1485, 0, 0, 0 ) 
attachElements ( hassan, source, 0.05, 0, 0.7, 0, 45, 118 ) 
toggleControl ( source , "jump", false ) 
toggleControl ( source , "sprint", false ) 
toggleControl ( source , "crouch", false ) 
end) 
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...