Jump to content

MontiVante

Members
  • Posts

    47
  • Joined

  • Last visited

Recent Profile Visitors

1,300 profile views

MontiVante's Achievements

Rat

Rat (9/54)

2

Reputation

  1. I have a problem when leaving the safe area I am bugeado when changing weapons I would like the weapons to be locked in the safe area and when leaving continue to function normally. local greenzone = createColRectangle(-2434.68799,-688.11896,150,200) local greenzoneMap = createRadarArea(-2434.68799,-688.11896,150,200,0,255,0,100) function greenzoneEnter (element) if ( getElementType(element) == "player" ) then if not ( getElementData(element,"invincible") ) then setElementData(element,"invincible",true) end outputChatBox("#00ff00[#fff000Zona Segura#00ff00] #ff0000Ha Entrado a Zona Segura#00ff00.",element,50,252,3,true) toggleControl(element,"fire",false) toggleControl(element,"next_weapon",false) toggleControl(element,"previous_weapon",false) toggleControl(element,"aim_weapon",false) toggleControl(element,"vehicle_fire",false) toggleControl(element,"vehicle_secondary_fire",false) setPedWeaponSlot(element,0) end end addEventHandler("onColShapeHit",greenzone,greenzoneEnter) function greenzoneLeave (element) if ( getElementType(element) == "player" ) then if ( getElementData(element,"invincible") ) then setElementData(element,"invincible",false) end outputChatBox("#00ff00[#fff000Zona Segura#00ff00] #ff0000Ha Dejado la Zona Segura#00ff00.",element,50,252,3, true) toggleControl(element,"fire",true) toggleControl(element,"next_weapon",true) toggleControl(element,"previous_weapon",true) toggleControl(element,"aim_weapon",true) toggleControl(element,"vehicle_fire",true) toggleControl(element,"vehicle_secondary_fire",true) end end addEventHandler("onColShapeLeave",greenzone,greenzoneEnter)
  2. I have a problem when starting the resource, the scoreboard does not work the columns I get this error. ERROR: scoreboard/export.lua:257: call: failed to call 'scoreboard:scoreboardAddColumn' [string "?"] ERROR: scoreboard/export.lua:258: call: failed to call 'scoreboard:scoreboardAddColumn' [string "?"] ERROR: scoreboard/export.lua:259: call: failed to call 'scoreboard:scoreboardAddColumn' [string "?"] ERROR: scoreboard/export.lua:260: call: failed to call 'scoreboard:scoreboardAddColumn' [string "?"] ERROR: scoreboard/export.lua:261: call: failed to call 'scoreboard:scoreboardAddColumn' [string "?"] I have no doubt as to how to solve the error, I ask for help, thank you. ----#################################################################################################################--------------------- ---- ID de país function onPlayerJoinToServer() if source then findIDForPlayer(source) local country = call(getResourceFromName("admin"),"getPlayerCountry",source) if country then setElementData(source,"country",country) else setElementData(source,"country","N/A") end end end addEventHandler("onPlayerJoin",getRootElement(),onPlayerJoinToServer) function findIDForPlayer(thePlayer) if thePlayer and not getElementData(thePlayer,"ID") then local i = 0 local players = getElementsByType("player") repeat local foundID = false i = i + 1 for _,player in pairs(players) do if player ~= thePlayer then local playerID = tonumber(getElementData(player,"ID")) if playerID == i then foundID = true break end end end until not foundID setElementData(thePlayer,"ID",i) end end function onServerIDStart() for i,thePlayer in pairs(getElementsByType("player")) do findIDForPlayer(thePlayer) local country = call(getResourceFromName("admin"),"getPlayerCountry",source) if country then setElementData(source,"country",country) else setElementData(source,"country","N/A") end end end addEventHandler("onResourceStart",resourceRoot,onServerIDStart) ----#################################################################################################################--------------------- ---Veículo setTimer ( function ( ) local players = getElementsByType "player" for k, v in ipairs ( players ) do if ( isPedInVehicle(v) ) then local vehicle = getPedOccupiedVehicle(v) local carname = getVehicleName(vehicle) setElementData ( v, "Veículo", tostring(carname) ) -- The element data must be exactly the same as the scoreboard column else setElementData ( v, "Veículo", "A Pie") end end end, 2500, 0 ) ----#################################################################################################################--------------------- ---- Money function updatePlayersMoney ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "Money", getPlayerMoney ( player ) ) end end setTimer ( updatePlayersMoney, 2500, 0 ) ----#################################################################################################################--------------------- addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "PlayTime" , hours .. " H: " .. minutes .. " M" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "PlayTime" , "0 H : 0 M" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "PlayTime" , "N/A" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "PlayTime" , hours .. " H : " .. minutes .. " M" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "PlayTime" , "00 H : 00 M" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerLogout" , root , function ( pAccount ) local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "PlayTime" , "N/A" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function actualizarJugadorOn ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "PlayTime" , hours .. " H : " .. minutes .. " M" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end ----#################################################################################################################--------------------- addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function (killer) givePlayerMoney(killer,100) addPlayerZombieKills(killer) end) function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if not zombieKills then setAccountData(account,"Zombie kills",0) end setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if zombieKills then setElementData(source,"Zombie kills",tostring(zombieKills)) else setElementData(source,"Zombie kills",0) end end) ----#################################################################################################################--------------------- addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", root, function ( killer ) addPlayerBossKills ( killer ) end ) function addPlayerBossKills ( killer ) local account = getPlayerAccount ( killer ) if isGuestAccount ( account ) then return end local BossKills = tonumber ( getAccountData ( account, "Boss kills" ) ) or 0 setAccountData ( account, "Boss kills", tonumber ( BossKills ) + 1 ) setElementData ( killer, "Boss kills", tonumber ( BossKills ) + 1 ) end addEventHandler ( "onPlayerLogin", root, function ( _, account ) local BossKills = tonumber ( getAccountData ( account, "Boss kills" ) ) or 0 setElementData ( source, "Boss kills", BossKills ) end ) ----#################################################################################################################--------------------- exports["scoreboard"]:scoreboardAddColumn ( "Zombie kills", root, 50, "Z.kill",5) exports["scoreboard"]:scoreboardAddColumn ( "Boss kills", root, 29,"B.Kill",6) exports["scoreboard"]:scoreboardAddColumn ( "Money", root, 50, "Dinero",8) exports["scoreboard"]:scoreboardAddColumn ( "PlayTime", root, 70, "Horas",3) exports["scoreboard"]:scoreboardAddColumn ( "Veículo", root, 60, "Vehiculo",8)
  3. I have a problem, to put the command / skills appear with double weapon here everything is fine, but when I die respawneo and I appear with 200 of life, I would like to help me solve the problem of not appearing with 200 life if not the maximum 100 of life. commandTimer5 = {} function Skills(thePlayer, commandName) if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) == ">THE-STAFF<" ) then if isTimer(commandTimer5[getPlayerSerial(thePlayer)]) then return outputChatBox( "#00FF00Skills: #FF0000¡No puedes usar este comando ahora mismo! Tu debes esperar!",thePlayer, 255, 255, 255,true) end setPedStat (thePlayer, 24, 1000) setPedStat (thePlayer, 69, 1000) setPedStat (thePlayer, 70, 1000) setPedStat (thePlayer, 71, 1000) setPedStat (thePlayer, 72, 1000) setPedStat (thePlayer, 73, 1000) setPedStat (thePlayer, 74, 1000) setPedStat (thePlayer, 75, 1000) setPedStat (thePlayer, 76, 1000) setPedStat (thePlayer, 77, 1000) setPedStat (thePlayer, 78, 1000) setPedStat (thePlayer, 79, 1000) setPedStat (thePlayer, 160, 1000) setPedStat (thePlayer, 31, 1000) setPedArmor ( thePlayer, 100 ) setElementHealth(thePlayer, 100) commandTimer5[getPlayerSerial(thePlayer)] = setTimer(function () end, 175000, 1) end end addCommandHandler("skills", Skills)
  4. good, I would like to ask for help for my boss since he has a problem, when the boss loses his life he spends his respawn time returns to reappear with all his life and the chat ... he would like it when the boss's life goes down Respawne until he dies and the chat does not appear while he is alive, but when he respawne with his time. function boss3 ( ) NemesisLosSantos = exports [ "slothBot" ]:spawnBot ( 1182.7412109375, -2036.556640625, 69.0078125, 90, 312, 0, 0, nil, 34,"waiting", true ) setElementModel ( NemesisLosSantos, 110 ) exports.extra_health:setElementExtraHealth ( NemesisLosSantos, 7000 ) outputChatBox ("#1DF30BEvento: El #FC0303BOSS Sniper Zombie #1DF30Bha vuelto a la vida. Ciudad Los Santos", getRootElement(), 255, 255, 255, true ) outputChatBox ("#1DF30BEvento: Premio #FC0303$20.000 #1DF30BPara El Player Que Mate Al Boss!",getRootElement(), 255, 255, 255, true ) Blip = (createBlipAttachedTo ( NemesisLosSantos, 23 )) setElementData ( NemesisLosSantos, "bossls", true ) setTimer(boss3, (60*1000*40), 1) setTimer(destroyElement, (60*1000*40), 1, NemesisLosSantos) setTimer(destroyElement, (60*1000*40), 1, Blip) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), boss3 ) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == NemesisLosSantos) then givePlayerMoney(killer,20000) --- dinero al matarlo -- killerName = getPlayerName(killer) triggerClientEvent(killer,"onShowMoney2",killer) weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=125,g=0,b=0}," *[Sniper Zombie]"},getRootElement(),wr,wg,wb ) -- killmesagge -- outputChatBox ( getPlayerName( killer ) .. " #1DF30BHa matado el #FC0303Boss Sniper #1DF30BRecompensa de #FC0303$20.000",getRootElement(), 255, 255, 255, true ) destroyElement(Blip) end end)
  5. hello, I would like to ask you to please help me with a function of my shop-car panel that is bugeada, when a player buys a car and then wants to sell it he does not let him sell the car, I need help with the function of selling a car that they no longer need. addEvent("SellMyVehicle", true) addEventHandler("SellMyVehicle", root, function(id) local vehicle = getVehicleByID(id) local data = dbPoll(dbQuery(db, "ELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "tablSe" and #data ~= 0 then local Money = math.ceil((data[1]["Cost"]*.9)*math.floor(data[1]["HP"])/100/10) givePlayerMoney (source, Money) if isElement(vehicle) then destroyElement(vehicle) end dbExec(db, "DELETE FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) outputChatBox("#FF0000|AL| #00ff00Usted vende su vehiculo por #00FF00$"..Money, source, 38, 122, 216, true) end end)
  6. Well the function that you passed me, does not save the position of the player to disconnect because when I leave the server I stay in another position but when I enter and log in I appear in the position of spawn and I need that does not happen, I want the position I had to disconnect me, there is logging in.
  7. hello bro, I did not speak of a spawn point, said that I just wanted a spawn for the new players example: I am a new player and he registered and I log in and spawneo, when he leaves and enters another day appears in the position that was cuabdo He had left. That's what I meant.
  8. THANK YOU BRO, sorry for bothering you xd, but there is a problem, the fadecamera works well: D that I am proud, but the problem is when I log in not spawneo in the place that was going to disconnect, aparesco in the coordinates of spawn, I would like you to help me when one logue appears in the position that was when you disconnect not in the position of the spawn, help me with that bro xd.
  9. brother does not work......... the functions that you have passed me does not work, the spawn works but the fadecamera does not, here is a picture of what the spawn does to the fadecamera. *Note: image of what spawn affects the fadecamera.* https://prnt.sc/iyz4y3 What I want is that the spawn does not affect the fadecamera, and I want the fadecamera to work normally but it does not buguee with the spawn. *Note: Here is an image of how I want the spawn to be linked to the fadecamera.* https://prnt.sc/iyzcue *Copy Link and paste it into a tab*
  10. hello, I come to ask for help is on the fadecamera of the login, I put a spawny and spawn makes the fadecamera not work, I would like to help me to make the fadecamera link with the spawn. FadeCamera: function setCameraOnPlayerJoin() local mat = math.random(1,4) fadeCamera(source, true, 5) if mat == 1 then setCameraMatrix(source, -2816.0283203125, 2125.6923828125, 156.8657989502, -2720.1396484375, 1835.1181640625, 133.21673583984) end if mat == 2 then setCameraMatrix(source, -1145.0048828125, 879.6533203125, 9.1189212799072, -1357.7978515625, 719.6279296875, 14.321132659912) end if mat == 3 then setCameraMatrix(source, 1135.3759765625, -1977.408203125, 78.517211914063, 1413.7529296875, -1617.5576171875, 63.588264465332) end if mat == 4 then setCameraMatrix(source, 2160.0869140625, -102.408203125, 5.6070313453674, 1894.4580078125, -146.1396484375, 21.12876701355) end end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) Spawn: local randomSpawnTable = { { 270.92654418945, -1986.3665771484, 797.52966308594 }, { 270.92654418945, -1986.3665771484, 797.52966308594 }, { 270.92654418945, -1986.3665771484, 797.52966308594 } } function randomSpawn( thePlayer, randomSpawnTable ) local random = math.random( 1, #randomSpawnTable ) spawnPlayer( thePlayer, randomSpawnTable[random][1], randomSpawnTable[random][2], randomSpawnTable[random][3] ) setElementModel ( thePlayer, 312 ) giveWeapon ( thePlayer, 46 ) giveWeapon ( thePlayer, 9 ) giveWeapon ( thePlayer, 25, 5000 ,true ) giveWeapon ( thePlayer, 28, 5000 ,true ) giveWeapon ( thePlayer, 31, 5000 ,true ) giveWeapon ( thePlayer, 22, 5000 ,true ) end function onPlayerJoin() setTimer(function(source) fadeCamera(source, true) setElementFrozen(source, true) setCameraTarget(source, source) randomSpawn(source, randomSpawnTable) end, 1000, 1, source) end addEventHandler("onPlayerJoin", root, onPlayerJoin) function onPlayerLogin() setElementFrozen(source, false) end addEventHandler("onPlayerLogin", root, onPlayerLogin) help I need the FadeCamera to work and that the spawn NO!! Buguee the FadeCamera.
×
×
  • Create New...