Jump to content

Snoop.Cat

Members
  • Posts

    29
  • Joined

  • Last visited

About Snoop.Cat

  • Birthday 24/04/1993

Details

  • Gang
    |Tsw|
  • Location
    Chile lindo <3

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Snoop.Cat's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. hey guys , i have this code on my userpanel to buy maps , but it doesnt not really buys the map , it takes the money but nothing happens then , also i dont know if is problem of racevoting_server.lua, but i dont know what to add on there. Client -- Get all maps on server function getMaps() totalServerMaps = 0 totalDmMaps = 0 totalDdMaps = 0 setTimer(callServerFunction,2000,1,"getServerMaps",getLocalPlayer()) end --addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),getMaps) function loadMaps(gamemodeMapTable, gamemode, map) guiGridListClear(gridMaps) if gamemodeMapTable then aGamemodeMapTable = gamemodeMapTable for id,gamemode in pairs (gamemodeMapTable) do if (gamemode.name == "Race") then for id,map in ipairs (gamemode.maps) do local row = guiGridListAddRow ( gridMaps ) guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false ) guiGridListSetItemData ( gridMaps, row, 1, map.resname) totalServerMaps = totalServerMaps+1 if (string.find(map.name,"[DM]",1,true)) then totalDmMaps = totalDmMaps+1 elseif (string.find(map.name,"[DD]",1,true)) then totalDdMaps = totalDdMaps+1 elseif (string.find(map.name,"[FUN]",1,true)) then totalDdMaps = totalDdMaps+1 end updateMapLabels(1) end end end end end -- Map search function mapSearch() guiGridListClear(gridMaps) local searchString = string.lower(guiGetText(editMapSearch)) if ( searchString == "" ) then for id,gamemode in pairs (aGamemodeMapTable) do if (gamemode.name == "Race") then for id,map in ipairs (gamemode.maps) do local row = guiGridListAddRow ( gridMaps ) guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false ) guiGridListSetItemData ( gridMaps, row, 1, map.resname) end end end else for id,gamemode in pairs (aGamemodeMapTable) do if (gamemode.name == "Race") then local noMapsFound = true for id,map in ipairs (gamemode.maps) do if string.find(string.lower(map.name.." "..map.resname), searchString, 1, true) then local row = guiGridListAddRow ( gridMaps ) guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false ) guiGridListSetItemData ( gridMaps, row, 1, map.resname) noMapsFound = false end end if noMapsFound == true then local row = guiGridListAddRow(gridMaps) guiGridListSetItemText (gridMaps, row, 1, "No maps matching your search query!", false, false) guiGridListSetItemColor (gridMaps, row, 1, 255,50,50) end end end end updateMapLabels(2) end function buyNextMap() local row,column = guiGridListGetSelectedItem(gridMaps) local mapName = guiGridListGetItemText(gridMaps,row,1) callServerFunction("buyMap",getLocalPlayer(),mapName) guiSetVisible(tabs[5],false) guiSetInputEnabled (false) showCursor(false) end --Command for buy maps function buyMapsCommand(command, ... ) local mapName = #{...}>0 and table.concat({...},' ') or nil if not(mapName)then getMapsOnce() guiSetVisible(tabs[5],true) guiSetInputEnabled (true) showCursor(true) else callServerFunction("buyMapSecond",getLocalPlayer(),mapName) end end addCommandHandler("bm", buyMapsCommand) -- Update labels function updateMapLabels(updateMode) if updateMode == 1 then guiSetText(lblTotalMapsOnServer,"Total maps on the server: "..totalServerMaps) guiSetText(lblTotalDmMaps,"Total DM Maps: "..totalDmMaps) guiSetText(lblTotalDdMaps,"Total DD/FUN Maps: "..totalDdMaps) else local row,column = guiGridListGetSelectedItem(gridMaps) local mapName = guiGridListGetItemText(gridMaps,row,1) if mapName == "" then guiSetText(lblSelectedMapName,"N/A") guiSetText(lblSelectedMapAuthor,"N/A") else guiSetText(lblSelectedMapName,mapName) if string.find(mapName,"[DM]",1,true) then guiSetText(lblSelectedMapAuthor,"Deathmatch") elseif string.find(mapName,"[DD]",1,true) then guiSetText(lblSelectedMapAuthor,"Destruction Derby") elseif string.find(mapName,"[FUN]",1,true) then guiSetText(lblSelectedMapAuthor,"Fun map") else guiSetText(lblSelectedMapAuthor,"UNKNOWN") end end end end Server -- Buy a next map function buyMap(thePlayer,mapName) if not(isEventRunning)then local playersOn = getPlayerCount() local playerPoint = tonumber(getPlayerDataRam(thePlayer,"pointsRam")) local playerCash = tonumber(getPlayerDataRam(thePlayer,"cash")) if mapIsAlreadySet == false then if not (mapName == "") then if(playersOn == 1)then triggerEvent("onPlayerBuyMap", getRootElement(), false, 50000, mapName) outputChatBox("#FF6600* #999999Buying a map when you are alone on the server is free.",thePlayer,255,255,255,true) return end if playerCash >= mapCost then triggerEvent("onPlayerBuyMap", getRootElement(), thePlayer, playerCash, mapName) else outputChatBox("#FF6600* #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) end else outputChatBox("#FF6600* #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) end else outputChatBox("#FF6600* #FFFFFFA map is already set, try again nextmap.",thePlayer,255,255,255,true) end else outputChatBox("#FF6600* #FFFFFFYou can't buy maps during the #aaff00DGE#FFFFFF.",thePlayer,255,255,255,true) end end function buyMapSecond(thePlayer,mapName) if not(isEventRunning)then local playersOn = getPlayerCount() local playerPoint = tonumber(getPlayerDataRam(thePlayer,"pointsRam")) local playerCash = tonumber(getPlayerDataRam(thePlayer,"cash")) if mapIsAlreadySet == false then if not (mapName == "") then if(playersOn == 1)then triggerEvent("onPlayerBuyMapSecond", getRootElement(), false, 50000, mapName) outputChatBox("#FF6600* #999999Buying a map when you are alone on the server is free.",thePlayer,255,255,255,true) return end if playerCash >= mapCost then triggerEvent("onPlayerBuyMapSecond", getRootElement(), thePlayer, playerCash, mapName) else outputChatBox("#FF6600* #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) end else outputChatBox("#FF6600* #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) end else outputChatBox("#FF6600* #FFFFFFA map is already set at the moment! Please try again later.",thePlayer,255,255,255,true) end else outputChatBox("#FF6600* #FFFFFFYou can't buy maps during the #aaff00DGE#FFFFFF.",thePlayer,255,255,255,true) end end function onPlayerSuccessfullyBuyMap(thePlayer, mapName, expensive) local playerCash = tonumber(getPlayerDataRam(thePlayer,"cash")) local cost = mapCost if(expensive)then cost = 50000 end setPlayerDataRam(thePlayer,"cash",playerCash-cost,false) scoreboardRefresh(thePlayer) outputChatBox("#FF4000*#FFFFFF "..getPlayerName(thePlayer).."#FFFFFF has bought #FF6600'"..mapName.."#FF6600'#FFFFFF!",getRootElement(),255,255,255,true) achievement31(thePlayer) end addEvent("onPlayerSuccessBuyMap", true) addEventHandler("onPlayerSuccessBuyMap", getRootElement(), onPlayerSuccessfullyBuyMap) rootElement = getRootElement() addEvent('buyMapFromPanel', true) function buyMFP(mapname) buyMap(source, command, mapname) end addEventHandler('buyMapFromPanel', rootElement, buyMFP) addCommandHandler("mapcount", function(source) local resourceTable = getResources() local mapcount = 0 for resourceKey, resourceValue in ipairs(resourceTable) do local type = getResourceInfo(resourceValue, "type") local game = getResourceInfo(resourceValue, "gamemodes") if type == "map" and game == "race" then mapcount = mapcount+1 else cancelEvent() end end outputChatBox("There are " ..tostring(mapcount).. " maps on the server.", source, 46, 154, 254) end ) addEvent("onRaceSetNextMap",true) addEventHandler("onRaceSetNextMap",getRootElement(), function () mapIsAlreadySet = true end) function executeOnMatStarting() mapIsAlreadySet = false end addEvent("onMapSuccessfullyStart") addEventHandler("onMapSuccessfullyStart", getRootElement(), executeOnMatStarting) --Disables the votemanager resource function disableRaceVotingResource() local resource = getResourceFromName ( "votemanager" ) if (getResourceState(resource) == "running" ) then stopResource(resource) end end addEventHandler("onMapStarting",getRootElement(),function()setTimer(disableRaceVotingResource, 3000, 1)end)
  2. hola amigos , quisiera preguntarles sobre un microfono y tambien preguntar que significa cada aspecto de este , el microfono es este Micrófono Chao Echo Mic Micrófono Chao Echo ofrece una calidad cristalina en la comunicación. Diseñado como un micrófono de solapa por lo que se puede conectar en collares o ropa a través del clip. 360 grados de rotación, y una capacidad para llevar tu voz en alta calidad a través de la red * Encendido y apagado imperceptible * Reducción de Echo (Ecolocación Sonora) Características Tipo: Omini-directional Frecuencia: 100 ~ 10K Hz Impedancia: < 2.2 kohm Sensibilidad: -34 ± 3 dBV / Pa a 1 kHz Largo de Cable: 2.7 m Tipo de Cable: Trenzado con Velcro quisiera que me ayudasen porfavor , quiero comprarme algo de calidad y no q mi voz suene mal. aconsejenme
  3. lolposers Dubstep? Nty si algunos temas de dubstep , pero actualizate ase rato q ya pasaron de moda los temas dubstep en la musica de mapas race.
  4. Snoop.Cat

    Radio Full

    Holaaaaa les quiero presentar mi Radio Emisora de internet "Radio FULL" bueno en esta emisora ponemos de todo tipo de musica menos Justin Biber y esas maracadas y Regeton , ponemos casi todos los temas de MTA Race y otros mas , tenemos ya 6 DJ que hacen programas diariamente para que sea una radio mas entretenida , contamos con scripts para android y MTA para que nos escuches donde sea!! la web de la radio es http://Radio-Full.Tk/ tambien puedes descargar el Script para MTA de nuestra radio! : https://community.multitheftauto.com/ind ... ls&id=6823 gracias por tomarse el tiempo de leer esto y pasenla Bien en la radio!
  5. problem solved thx alot csmith
  6. it doesnt works it doesnt start music from resource and not mute the music from maps
  7. miki no one of those codes works , it doesnt not even mute any sound
  8. start the script and mute every music from every race map that loads a new music..
  9. it mutes the music but when a new map load the music from new map starts anyway
  10. soo code should be like for i, sound in ipairs(getElementsByType("sound")) do setSoundVolume(sound, 0) end function startMusic() setRadioChannel(0) song = playSound("song.mp3",true) end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("music",toggleSong) bindKey("m","down","music") and then only this sound of this specific script will play and others from maps will be muted always?
  11. im srry im noob on scripting , where i should put that code? and also do i should use a setTimer so when a new race map start then it mutes it again?
×
×
  • Create New...