-
Posts
134 -
Joined
-
Last visited
Everything posted by LucasBaker
-
animation not to setTimer ( function(source) setPedAnimation( source, false) outputChatBox("[sERVER] Efeito das drogas passou", source) end, 2000, 1 )
-
the animation is not going to enter / usardrogas
-
Hello because SetTimer not working? is to stop the animation after 2 seconds dMarker = createMarker(2251.50732, 2489.24927, 10.99080, 'cylinder', 2.0, 255, 0, 0, 150) function cDrogas(source) if isElementWithinMarker(source, dMarker) then outputChatBox("[sERVER] Você usou drogas ", source) setPedAnimation ( source, "CRACK", "Bbalt_Idle_02") setElementHealth ( source, getElementHealth(source) - 1 ) setPedArmor ( source, getPedArmor(source)+4 ) setTimer ( function() setPedAnimation(source) outputChatBox("[sERVER] Efeito das drogas passou", source) end, 5000, 1 ) else outputChatBox("[sERVER] Você não está no marker", source) end end addCommandHandler("usardrogas", cDrogas)
-
Well I'd like to cancel a function when the theplayer typed / abandonar function cancelarEvento (thePlayer) cancelEvent(funcoes) outputChatBox ( "Você abandonou o evento!", thePlayer, 255, 0, 0, true ) setElementDimension(thePlayer,0) end addCommandHandler ( "abandonar", cancelarEvento ) complete code: function Mensagem () outputChatBox ( "#00FFFFUm evento foi aberto digite /participar para participar!", getRootElement(), 255, 0, 0, true ) end addEventHandler ( "onResourceStart", getResourceRootElement ( ), Mensagem ) function funcoes (thePlayer) takeAllWeapons ( thePlayer ) setElementDimension ( thePlayer, 300 ) setPedArmor ( thePlayer, 100 ) setElementHealth ( thePlayer, 569 ) giveWeapon ( thePlayer, 38, 1000000000 ) giveWeapon ( thePlayer, 38, 1000000000 ) setElementPosition ( thePlayer, -2353.73901, 1536.69714, 26.04688 ) addEventHandler ( "onPlayerSpawn", thePlayer, onSpawn ) end addCommandHandler ( "participar", funcoes ) function parandoEvento ( ) outputChatBox ( "#00FFFFEvento fechado!", getRootElement(), 255, 0, 0, true ) end addEventHandler ( "onResourceStop", getResourceRootElement ( ), parandoEvento ) function onSpawn ( ) takeAllWeapons ( source ) setElementDimension ( source, 300 ) setPedArmor ( source, 100 ) setElementHealth ( source, 569 ) giveWeapon ( source, 38, 1000000000 ) setElementPosition ( source, -2353.73901, 1536.69714, 26.04688 ) end function cancelarEvento (thePlayer) cancelEvent(funcoes) outputChatBox ( "Você abandonou o evento!", thePlayer, 255, 0, 0, true ) setElementDimension(thePlayer,0) end addCommandHandler ( "abandonar", cancelarEvento )
-
because I am unable to generate the nick of targetPlayer? function gerarI (targetPLayer) local target = getPlayerFromName (targetPlayer) local geta = getPlayerName (target) outputChatBox ( "Nome: "..targetPlayer, getRootElement(), 255, 0, 0, true ) end addCommandHandler ( "pc", gerarI )
-
in / debugscript gets this error thankss
-
Why not work? function spawnArmas (player) giveWeapon ( player, 24, 200 ) - Desert Eagle giveWeapon ( player, math.random(26,27), 200 ) - Sawn ou Spaz giveWeapon ( player, math.random(30,31), 200 ) - M4 ou AK end addEventHandler ( "onPlayerSpawn", getRootElement(), spawnArmas )
-
Well I'm trying to create a script that performs the following work I type / invite [player] and when the guest player typing / join gang which he shall enter the functions I use for this?
-
works thanks
-
still not working local numPlayers = getPlayerCount() local maxPlayers = getMaxPlayers() local aTable3 = { ['Jarvis, how many players are online?'] = {numPlayers.."/"..maxPlayers}, } addEventHandler('onPlayerChat',root, function ( Massege2 ) for v in pairs ( aTable3 ) do if string.find ( Massege2,v ) then cancelEvent ( ) outputChatBox ( 'Jarvis: '..aTable3 [ v ] [ 1 ]..' ',root,r,g,b ) end end end )
-
Had already solved but still I have a doubt what I did wrong here? local numPlayers = getPlayerCount() local maxPlayers = getMaxPlayers() local aTable3 = { ['Jarvis, how many players are online?'] = { numPlayers .. "/" .. maxPlayers }, } addEventHandler('onPlayerChat',root, function ( Massege ) for v in pairs ( aTable ) do if string.find ( Massege,v ) then cancelEvent ( ) outputChatBox ( 'Jarvis: The server possesses a total of '..aTable3 [ v ] [ 1 ]..' ',root,r,g,b ) end end end )
-
Well I'm trying to create a script to do when someone asks Jarvis, what time is it answers But the time ta going as normal output help-me local time = getRealTime() local hours = time.hour local minutes = time.minute local aTable2 = { ['Jarvis, que horas são?'] = { "hours..":"..minutes" }, } addEventHandler('onPlayerChat',root, function ( Massege ) for v in pairs ( aTable2 ) do if string.find ( Massege,v ) then cancelEvent ( ) outputChatBox ( 'Jarvis: São '..aTable2 [ v ] [ 1 ]..' ',root,r,g,b ) end end end )
-
local myMarker = createMarker(x, y, z, 'cylinder', 2.0, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) outputChatBox( elementType.." Teleported", getRootElement(), 255, 255, 0 ) setElementPosition ( source, x, y, z ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) not tested
-
local meuMarker = createMarker ( x, y, z, "cylinder", 1, 255, 0, 0, 100 ) function celtonX ( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) createVehicle ( 432, ..elementType.. ) end addEventHandler( "onMarkerHit", meuMarker, MarkerHit ) Well I'm trying to create a script when the player go through the marker it will appear with the vehicle id 432 but I think you missed this line createVehicle ( 432, ..elementType.. ) could someone help me?
-
Not tested/is that what you want? local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) function hill_Enter ( thePlayer, matchingDimension ) if (getElementType(thePlayer) == "player") then outputChatBox( getPlayerName(thePlayer) .. " entered into a radioactive zone!", getRootElement(), 255, 255, 109 ) setElementHealth ( thePlayer,- 100 ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter )
-
Server: function forceReload(p) reloadPedWeapon (p) end addCommandHandler("Reload weapon",forceReload) function bindPlayerReloadKey(p) bindKey(p,"r","down","Reload weapon") end function bindReloadForAllPlayers() for k,v in ipairs(getElementsByType("player")) do bindPlayerReloadKey(v) end end --addEventHandler("onResourceStart",getResourceRootElement(),bindReloadForAllPlayers) -- Enable when issue 4532 is fixed --Please remove the following when issue 4532 is fixt: addEvent("onPlayerReload",true) addEventHandler("onPlayerReload",getRootElement(), function() reloadPedWeapon (source) end ) Client: addCommandHandler("Reload weapon", function() local task = getPedSimplestTask(localPlayer) if ((task == "TASK_SIMPLE_JUMP" or task == "TASK_SIMPLE_IN_AIR") and not doesPedHaveJetPack(localPlayer)) then return end triggerServerEvent("onPlayerReload", localPlayer) end ) bindKey("r","down","Reload weapon")
-
function payDay ( thePlayer, commandName, theLevel) outputChatBox ( "#DDA0DD[PAYDAY] Ativaram o Payday",getRootElement(), 255, 0, 0, true ) end addEventHandler ( "onResourceStart",resourceRoot, payDay ) setTimer(function() local account = getPlayerAccount ( thePlayer ) local theLevel = 1 ( theLevel ) or 1 exports.exp_system:setAccountLevel ( account, theLevel ) end ) outputChatBox ( "#DDA0DD--PAYDAY--",getRootElement(), 255,0,0, true ) outputChatBox ( "#708090Pagamento: 2000$",getRootElement(), 255,0,0, true ) outputChatBox ( "#708090Imposto Cobrado: 200$",getRootElement(), 255,0,0, true ) outputChatBox ( "#708090Você ganhou um Level",getRootElement(), 255,0,0, true ) for I,v in ipairs(getElementsByType('player')) do givePlayerMoney (v,2000 ) takePlayerMoney (v,200 ) end end, 6000000, 1) Okay, but now I wish every one player Payday gain a level I am using the system xp / level of Castillo https://wiki.multitheftauto.com/wiki/Resource:Exp_system
-
yes, well? function payDay2 () setTimer (payDay2)() outputChatBox ( "#DDA0DD--PAYDAY--" getRootElement(), 255,0,0, true ) outputChatBox ( "#708090Pagamento: 2000$" getRootElement(), 255,0,0, true ) outputChatBox ( "#708090Imposto Cobrado: 200$" getRootElement(), 255,0,0, true ) givePlayerMoney ( 2000 ) takePlayerMoney ( 200 ) end, 600000, 1) end
-
-- Server Side -- function payDay () outputChatBox ( "#DDA0DD[PAYDAY] Ativaram o Payday" getRootElement(), 255, 0, 0, true ) addEventHandler ( "onResourceStart", getRootElement(), payDay ) - evento function payDay2 () setTimer (payDay2) outputChatBox ( "#DDA0DD--PAYDAY--" getRootElement(), 255,0,0, true ) outputChatBox ( "#708090Pagamento: 2000$" getRootElement(), 255,0,0, true ) outputChatBox ( "#708090Imposto Cobrado: 200$" getRootElement(), 255,0,0, true ) givePlayerMoney ( 2000 ) takePlayerMoney ( 200 ) end, 600000, 1) end SetTimer is correct?
-
function tele (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then setElementPosition ( thePlayer, -564.47814941406, 310.98858642578, 491.93438720703 ) outputChatBox ('#FF0000[ #00ff00/areavip#FF0000 ]: #00FFFF' .. getPlayerName(thePlayer) .. ' #828282Foi para a Area VIP !', root, 255, 255, 255, true) else outputChatBox ('Apenas VIPs podem usar esse comando', thePlayer, 255, 255, 255, true) end end addCommandHandler ( "areavip", tele ) Crie uma acl com o nome VIP, verifique o meta
-
Hello, I am trying to create a script to do that to save scores but do not know much mess with MYSQL could help me? Code: function onPlayerQuit() local playerAccount = getPlayerAccount(source) if (playerAccount) then local playerScores = getElementData(source) setAccountData(playerAccount, "kills", playerScores) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) function onPlayerLogin() local playerAccount = getPlayerAccount(source) if (playerAccount) then local playerScores = getAccountData(playerAccount, "kills") if (playerScores) then setElementData(source, playerScores) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) -- add an event handler
