Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. Wait what??? 2 months? Not that much, only some 10-12 days. Yeah better edit October to September. That was a accident duh.. Anyways I'll post screenshots after coming from school.
  2. https://community.multitheftauto.com/ind ... s&id=10009 https://community.multitheftauto.com/ind ... s&id=10008 Leaked CSG resources DONE
  3. 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
  4. local carT = 10000 function desapar() car = setTimer(destroyElement, carT, 1, source) end addEventHandler("onVehicleStartExit",getRootElement(),desapar) function test() if isTimer ( car ) then killTimer ( car ) end end addEventHandler("onVehicleStartEnter",getRootElement(),test)
  5. Anubhav

    Relative

    Oh ty.. I got it
  6. local car = 10000 function desapar() setTimer(destroyElement, car, 1, source) end addEventHandler("onVehicleStartExit",getRootElement(),desapar) addEventHandler("onVehicleStartEnter", getRootElement(), function ( theplayer, seat, jacked ) destroyElement ( source ) end )
  7. Anubhav

    Relative

    Is it possible to make dx into relative? I don't realy know how should I get the relative positions! Can someone help :-/
  8. local r,g,b,a = 255, 255, 255, 255 addEventHandler('onClientRender', root, function() dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( r, g, b, a ), 1.02, "pricedown" ) end r,g,b,a = 255, 0, 255, 200 ) Do something like this.
  9. Client: - Remember to attach a event handler ( onClientGUIClick maybe? ) function someFunc() local edit = guiGetText(editBoxName) if edit == "" then return end triggerServerEvent("createMyTeam", localPlayer, edit) end Server: addEvent("createMyTeam", true) addEventHandler("createMyTeam", root, function(team) createTeam(team) end )
  10. Wait what??? 2 months? Not that much, only some 10-12 days.
  11. xXMADEXx I also know. But I am not on vacation as you are on. I've to work on my server too.
  12. addEventHandler ( 'onPlayerJoin', root, function () bindKey ( source, 'u', 'down', adminchat ) end)
  13. They're not the core commands at all. Core commands are listed on wiki.
  14. there is a misunderstanding, there is a predifined list of command in mta or not?? i mean without loading any resource or script. Those are not in-bulit MTA commands at all.. Those commands are used and made in admin resource.
  15. Anubhav

    [Help] SQL

    executeSQLQuery ("UPDATE `Vehs` SET `ColorR` = ?, `ColorG` = ?, `ColorB` = ?, `cost` = ? WHERE `Account` = ? AND `Model` = ?", r, g, b, cost, tostring(getAccountName(getPlayerAccount (source))), id)
  16. (facepalm). I seriously wanted to create 1 for community, you reminded me. Thanks !
  17. Simple and basic. Waiting for your more releases. Not that bad even. Github isn't needed for this seriously nor pastebin do.
×
×
  • Create New...