Jump to content

طلب 3 اكواد


Recommended Posts

local x, y, z = getElementPosition(element) 
local shield = createObject(3504, x, y, z) 
attachElements(shield, element, 0, 1, 0.1) 

destroyElement(shield) 

Link to comment
local x, y, z = getElementPosition(element) 
local shield = createObject(3504, x, y, z) 
attachElements(shield, element, 0, 1, 0.1) 

destroyElement(shield) 

مشكوووور كثير

بس واجهتني مشكله بعممل السرعه speed

addEvent("buyspeed",true)  
  
  
addEventHandler("buySpeed",root,  
  
  
function() 
    if ( getPlayerMoney (source) >= 2000 ) then 
        takePlayerMoney(source, 2000)  
          
function(sourcePlayer, command, value) 
    setGameSpeed(tonumber(value)) 
  
        local name = getPlayerName(source) 
  
  
            outputChatBox ( "" .. name .. " #ffff00 Has Bought  #00ffff[speed] ", getRootElement(), 255, 0, 0, true ) 
  
  
      else 
        outputChatBox("#00cc00 You don't have #ff0000 $2000 #00cc00 to buy #ffff00[speed]", source, 255, 0, 0, true) 
    end 
  end ) 
  
  

Link to comment

عندك أخطاء كثير

لازم تستخدمها كلينت لان إذا أستخدمتها سيرفر بتتغير السرعة لكل اللاعبين setGameSpeed الوظيفة

--Server-Side--

addEvent("buySpeed",true) 
addEventHandler("buySpeed",root, 
function() 
     if getPlayerMoney (source) >= 2000 then 
          takePlayerMoney(source, 2000) 
          triggerClientEvent(source,"setPlayerSpeed",source) 
          outputChatBox(getPlayerName(source).." #ffff00Has Bought #00ffff[speed]",root,255,0,0,true) 
     else 
          outputChatBox("#00cc00You don't have #ff0000$2000 #00cc00to buy #ffff00[speed]",source,255,0,0,true) 
     end 
end) 

--Client-Side--

function setSpeed() 
     setGameSpeed(10) 
end 
addEvent("setPlayerSpeed",true) 
addEventHandler("setPlayerSpeed",root,setSpeed) 

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