Jump to content

DayZ shop fix?


YoungerTiny

Recommended Posts

Hello, I'm using the Global DayZ points script..

I can purchase pizza, etc but some things like backpack are not working.. here's one I can't purchase.

--- Outros 
  
function BuyWeaponOnServer(outros_name,data,value) 
    player_money      = getPlayerMoney(source) 
  
        if(outros_name == "Outro_Alice") then 
              if ( player_money >= 100) then 
                setElementData(source, "MAX_Slots" , 42 ) 
                takePlayerMoney(source, 100) 
                outputChatBox("#FF0000[sHOP] #FFFFFFPthe item was purchased successfully.", source, 255, 255, 255 , true) 
            else 
                outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough GP.(Gracz - 20 GP, Zombie - 1 GP)", source, 255, 255, 255 , true) 
            end 
    end 
            if(outros_name == "Outro_Road") then 
              if ( player_money >= 10) then 
                setElementData(source, "Roadflare",getElementData(source,"Roadflare") + 5) 
                takePlayerMoney(source, 10) 
                outputChatBox("#FF0000[sHOP] #FFFFFFPthe item was purchased successfully.", source, 255, 255, 255 , true) 
            else 
                outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough GP.(Gracz - 20 GP, Zombie - 1 GP)", source, 255, 255, 255 , true) 
            end 
    end 
                if(outros_name == "Outro_Wire") then 
              if ( player_money >= 50) then 
                setElementData(source, "Wire Fence",getElementData(source,"Wire Fence") + 10) 
                takePlayerMoney(source, 50) 
                outputChatBox("#FF0000[sHOP] #FFFFFFPthe item was purchased successfully.", source, 255, 255, 255 , true) 
            else 
                outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough GP.(Gracz - 20 GP, Zombie - 1 GP)", source, 255, 255, 255 , true) 
            end 
    end 
            if(outros_name == "Outro_Czech") then 
              if ( player_money >= 200) then 
                setElementData(source, "MAX_Slots" , 60 ) 
                takePlayerMoney(source, 200) 
                outputChatBox("#FF0000[sHOP] #FFFFFFPthe item was purchased successfully.", source, 255, 255, 255 , true) 
            else 
                outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough GP.(Gracz - 20 GP, Zombie - 1 GP)", source, 255, 255, 255 , true) 
            end 
    end 
                if(outros_name == "Outro_Full") then 
              if ( player_money >= 300) then 
                setElementData(source, "Full Gas Canister",getElementData(source,"Full Gas Canister") + 2) 
                takePlayerMoney(source, 300) 
                outputChatBox("#FF0000[sHOP] #FFFFFFPthe item was purchased successfully.", source, 255, 255, 255 , true) 
            else 
                outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough GP.(Gracz - 20 GP, Zombie - 1 GP)", source, 255, 255, 255 , true) 
            end 
    end 
end 
  
addEvent("onClientBuyOutros", true) 
addEventHandler("onClientBuyOutros", getRootElement(), BuyWeaponOnServer) 
  
  

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