function BuyWeaponOnServer(weapon_name,data,value) player_money = getPlayerMoney(source) if(weapon_name == "weapon_CZ550") then if ( player_money >= 1000) then setElementData(source,"CZ 550",getElementData(source,"CZ 550") + 1) setElementData(source,"CZ 550 Mag",getElementData(source,"CZ 550 Mag") + 25) takePlayerMoney(source, 1000) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_DesertEagle") then if ( player_money >= 300) then setElementData(source,"Desert Eagle",getElementData(source,"Desert Eagle") + 1) setElementData(source,"Desert Eagle Mag",getElementData(source,"Desert Eagle Mag") + 35) takePlayerMoney(source, 300) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_Granada") then if ( player_money >= 500) then setElementData(source,"Grenade",getElementData(source,"Grenade") + 1) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_M4") then if ( player_money >= 800) then setElementData(source,"M4",getElementData(source,"M4") + 1) setElementData(source,"M4 Mag",getElementData(source,"M4 Mag") + 60) takePlayerMoney(source, 800) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_AK47") then if ( player_money >= 700) then setElementData(source, "AK-47",getElementData(source,"M4") + 1) setElementData(source,"AK Mag",getElementData(source,"M4 Mag") + 120) takePlayerMoney(source, 700) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_M9SD") then if ( player_money >= 500) then setElementData(source, "M9 SD",getElementData(source,"M4") + 1) setElementData(source,"M9 SD Mag",getElementData(source,"M4 Mag") + 75) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end addEvent("onClientBuyWeapon", true) addEventHandler("onClientBuyWeapon", getRootElement(), BuyWeaponOnServer) --- Comida function BuyWeaponOnServer(food_name,data,value) player_money = getPlayerMoney(source) if(food_name == "Comida_Pizza") then if ( player_money >= 30) then setElementData(source, "Pizza",getElementData(source,"Pizza") + 5) takePlayerMoney(source, 30) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_Milk") then if ( player_money >= 30) then setElementData(source, "Milk",getElementData(source,"Milk") + 5) takePlayerMoney(source, 30) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_Cooked") then if ( player_money >= 60) then setElementData(source, "Cooked Meat",getElementData(source,"Cooked Meat") + 5) takePlayerMoney(source, 60) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_Soda") then if ( player_money >= 50) then setElementData(source, "Soda Bottle",getElementData(source,"Soda Bottle") + 5) takePlayerMoney(source, 50) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_BeansCan") then if ( player_money >= 40) then setElementData(source, "Beans Can",getElementData(source,"Beans Can") + 4) takePlayerMoney(source, 40) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_WaterBottle") then if ( player_money >= 50) then setElementData(source, "Water Bottle",getElementData(source,"Water Bottle") + 5) takePlayerMoney(source, 50) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end addEvent("onClientBuyComida", true) addEventHandler("onClientBuyComida", getRootElement(), BuyWeaponOnServer) --- Outros function BuyWeaponOnServer(outros_name,data,value) player_money = getPlayerMoney(source) if(outros_name == "Outro_Alice") then if ( player_money >= 300) then setElementData(source, "MAX_Slots" , 22 ) takePlayerMoney(source, 300) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(outros_name == "Outro_Road") then if ( player_money >= 10) then setElementData(source, "Roadflare",getElementData(source,"Roadflare") + 1) takePlayerMoney(source, 10) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", 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") + 1) takePlayerMoney(source, 50) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(outros_name == "Outro_Czech") then if ( player_money >= 600) then setElementData(source, "MAX_Slots" , 30 ) takePlayerMoney(source, 600) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", 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] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end addEvent("onClientBuyOutros", true) addEventHandler("onClientBuyOutros", getRootElement(), BuyWeaponOnServer) --- Municao function BuyWeaponOnServer(municao_name,data,value) player_money = getPlayerMoney(source) if(municao_name == "Municao_CZ550Mag") then if ( player_money >= 500) then setElementData(source, "CZ 550 Mag",getElementData(source,"CZ 550 Mag") + 25) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_MP5Mag") then if ( player_money >= 100) then setElementData(source, "MP5A5 Mag",getElementData(source,"MP5A5 Mag") + 60) takePlayerMoney(source, 100) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_PDWMag") then if ( player_money >= 200) then setElementData(source, "PDW Mag",getElementData(source,"PDW Mag") + 60) takePlayerMoney(source, 200) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_WinchesterMAG") then if ( player_money >= 200) then setElementData(source, "1866 Slug",getElementData(source,"1866 Slug") + 21) takePlayerMoney(source, 200) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_AKMag") then if ( player_money >= 400) then setElementData(source, "AK Mag",getElementData(source,"AK Mag") + 90) takePlayerMoney(source, 400) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_M4Mag") then if ( player_money >= 500) then setElementData(source, "M4 Mag",getElementData(source,"M4 Mag") + 80) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end