Jump to content

مشكله في شوب


G.KinG

Recommended Posts

سلام عليكم ,

وانا قاعد اسوي شوب اسلحه جاتني مشكله ._.

المشكله اني لما اضغظ على الزر ما يسير شي بس يطلع في الدي بوق المشكله

الكود حق السلاح

  
--client 
addEventHandler ("onClientGUIClick", getRootElement(),  
function(button, state, absoluteX, absoluteY) 
if ( source ==  GUIEditor.button[2] ) then  
triggerServerEvent("Silenced",getLocalPlayer())  
end  
end  
) 

  
--server 
addEventHandler("Silenced",root, 
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 1800) then 
    takePlayerMoney(source,1800) 
    giveWeapon ( source ,  23,50 ) 
    setPedWeaponSlot(source, getSlotFromWeapon(23)) 
    local name = getPlayerName(source) 
    outputChatBox ( "#55D32B* [ "..name .." ] Has Bought Silenced ", getRootElement(), 255, 0, 0, true ) 
    else 
    outputChatBox("#FF0000* You don't have money", source, 255, 0, 0, true) 
end 
end) 
  

ورساله الدي بوق

ERROR Client (KinG) triggerd serverside event Silenced, but event is not added serverside

الشوب مثل شوب عاشق بس ازرار ,

:redhotevil:

Link to comment

زي كذا ؟ :)

addEvent("Silenced", true) 
addEventHandler("Silenced",root, 
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 1800) then 
    takePlayerMoney(source,1800) 
    giveWeapon ( source ,  23,50 ) 
    setPedWeaponSlot(source, getSlotFromWeapon(23)) 
    local name = getPlayerName(source) 
    outputChatBox ( "#55D32B* [ "..name .." ] Has Bought Silenced ", getRootElement(), 255, 0, 0, true ) 
    else 
    outputChatBox("#FF0000* You don't have money", source, 255, 0, 0, true) 
end 
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...