ice_brasil
Members-
Posts
127 -
Joined
-
Last visited
Everything posted by ice_brasil
-
the script is to send an invitation to another player an invitation to warp more than is started only if the other player accepts What did this wrong? local invitations = {} addCommandHandler("tpa", function (thePlayer, cmd, who) if (not who or who == "") then outputChatBox("/"..cmd..": Nenhum jogador inserido.",thePlayer,255,0,0) return end local player = getPlayerFromName(who) if (not player) then outputChatBox("/"..cmd..": Esse player não existe.",thePlayer,255,0,0) return end if (invitations[thePlayer]) then outputChatBox("/"..cmd..": Você já enviou um convite tpa.",thePlayer,255,0,0) return end outputChatBox(getPlayerName(player) .." Quer ir até você digite /aceitar ".. getPlayerName(thePlayer) ..".",player,0,255,0) outputChatBox("Você um convite de tpa para".. getPlayerName(player) ..".",player,0,255,0) invitations[thePlayer] = player setTimer(function () invitations[thePlayer] = nil end, 60000, 1) end) addCommandHandler("aceitar", function (thePlayer, cmd, who) if (not who or who == "") then outputChatBox("/"..cmd..": Nenhum jogador inserido.",thePlayer,255,0,0) return end local player = getPlayerFromName(who) if (not player) then outputChatBox("/"..cmd..": Esse player não existe.",thePlayer,255,0,0) return end if invitations[player] then setElementPosition(player, getElementPosition(thePlayer)) outputChatBox("Você aceitou o tpa de ".. getPlayerName(player) .."'s ",thePlayer,0,255,0) outputChatBox(getPlayerName(thePlayer) .. " aceitou o seu convite warp.",player,0,255,0) invitations[player] = nil end end) function getPlayerFromNickPart(part) local player part=string.lower(part) for _,p in ipairs(getElementsByType("player")) do local nick=string.lower(getPlayerName(p):gsub("#%x%x%x%x%x%x","")) if string.find(nick,part) then if not player then player=p else return false end end end return player end
-
WARNING:Loading script failed: tpa/trazer.lua:9:')' expected near 'pushes'
-
WARNING:Loading script failed: tpa/trazer.lua:9:')' expected near 'pushes'
-
I want when I type / push (playername) the player chosen to come to me My Client: addCommandHandler("push", function(p, c, t) local pushPlayer = findPlayer(t) if pushPlayer then local pushVehicle = getPedOccupiedVehicle(pushPlayer) if pushVehicle then local speedX, speedY, speedZ = getElementVelocity(pushVehicle) setElementVelocity(pushVehicle, 0, 0, 0+0.2) outputChatBox("getPlayerName(p).." pushes "..getPlayerName(pushPlayer).." up!", root, 255, 0, 0) end end end ) function findPlayer(name) local name = name:lower() for i, p in ipairs(getElementsByType("player")) do local fullname = getPlayerName(p):lower() if string.find(fullname:gsub("#%x%x%x%x%x%x", ""), name, 1, true) then return p end end return false end What did this wrong?
-
GOGO SKYPE URGENT!
-
so must its a bug on my server, Please pass me the client and the server that panel to see if it was not me that bug or pass me the entire script panel by skype
-
does not work: s
-
ClientSide: GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(2, 2, 798, 598, "MTA TORCIDAS 1.0", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.staticimage[1] = guiCreateStaticImage(185, 35, 452, 119, ":paineltimes/pluss.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(564, 303, 39, 40, ":paineltimes/figueirense.png", false, GUIEditor.staticimage[1]) GUIEditor.label[1] = guiCreateLabel(261, 164, 446, 55, "Selecione seu time", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-gothic") GUIEditor.button[1] = guiCreateButton(29, 340, 122, 39, "Botafogo", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") guiSetFont(GUIEditor.label[2], "sa-header") GUIEditor.staticimage[23] = guiCreateStaticImage(163, 243, 39, 31, ":paineltimes/corintians.png", false, GUIEditor.window[1]) showCursor(true) guiSetVisible(window,true) end ) bindKey ( "F2", "down", function ( ) local tostate = not guiGetVisible ( GUIEditor.window[1] ) guiSetVisible ( GUIEditor.window[1], tostate ) showCursor ( tostate ) end ) function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1479.6, -1612.8, 14.0 triggerServerEvent("movePlayerToBotafogo", getLocalPlayer(), getLocalPlayer(), teleportX, teleportY, teleportZ) showCursor(false) guiSetVisible(GUIEditor.window[1],false) outputChatBox("Bem vindo ao botafogo!") end end addEventHandler("onClientGUIClick", root, teleportPlayer) addEventHandler('onClientGUIClick',GUIEditor.button[1], function ( ) triggerServerEvent('LoadServer',localPlayer) guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor (false) outputChatBox("Bem vindo ao botafogo!") end,false ) I took the other buttons because the client only need this! Serverside: function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1479.6, -1612.8, 14.0 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) end end addEventHandler("onClientGUIClick", root, teleportPlayer) addEvent('LoadServer',true) addEventHandler('LoadServer',root, function ( ) setElementPosition ( source,1479.6, -1612.8, 14.0 ) setElementModel ( source,0 ) end )
-
addEventHandler('onClientGUIClick',GUIEditor.button[1], function ( ) triggerServerEvent('LoadServer',localPlayer) guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor (false) outputChatBox("Bem vindo ao botafogo!") end,false )
-
Bad argument @ 'addEventHandler' [expected element at argument 2,got nill]
-
Yes it is necessary to choose a panel of team, I need the skin 0. I copied again and it did not work
-
Not changing skin '-'
-
just one doubt: If you click this button for when the player changes to the skin that I want function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1479.6, -1612.8, 14.0 triggerServerEvent("movePlayerToBotafogo", getLocalPlayer(), getLocalPlayer(), teleportX, teleportY, teleportZ) guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) outputChatBox("Bem vindo ao botafogo!") setElementModel(playerSource, 0) showCursor(false) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick", root, teleportPlayer) I added the: setElementModel(playerSource, 0) What did this wrong?
-
worked tanks
-
is showing the outputchatbox normally, however the player is not being teleported: IF the error in the console continues ...
-
do not know what it might add! can add me? Do not know much about gui
-
error:client triggered serversire event movePlayerToBotafogo, but event is not added serverside of the same mistake I've done everything right and put the clientside on the serverside and nothing!
-
error:client triggered serversire event movePlayerToBotafogo, but event is not added serverside I've tried later add the function in a more serverside not work neither in the clientside nor serverside in the same error
-
is giving error in show cursor or GuiGetVisible
-
I want to block for these vehicles shoot ta What do wrong? function disableFireForHydra ( theVehicle, seat ) if ( getElementModel ( theVehicle ) == 520 ) then setVehicleGunsEnabled ( theVehicle, false ) else setVehicleGunsEnabled ( theVehicle, true ) end end addEventHandler ( "onClientPlayerEnterVehicle", getLocalPlayer(), disableFireForHydra ) function disableFireForRhino ( theVehicle, seat ) if ( getElementModel ( theVehicle ) == 532 ) then setVehicleGunsEnabled ( theVehicle, false ) else setVehicleGunsEnabled ( theVehicle, true ) end end addEventHandler ( "onClientPlayerEnterVehicle", getLocalPlayer(), disableFireForHydra ) function disableFireForHydra ( theVehicle, seat ) if ( getElementModel ( theVehicle ) == 525 ) then setVehicleGunsEnabled ( theVehicle, false ) else setVehicleGunsEnabled ( theVehicle, true ) end end addEventHandler ( "onClientPlayerEnterVehicle", getLocalPlayer(), disableFireForHydra )
-
The function of this script is for a reward upon a player example / hitman (nameplayer) (reward) And so a player kill player chosen it gets the value promised But it does not work what i did wrong? HitmanEvent = { reward = 0, } function Hitman( player, ammo, attacker, weapon, bodypart ) if attacker then if ( getElementType ( attacker ) == "player" ) then if ( source == HitmanEvent.element ) then if HitmanEvent.reward > 0 then givePlayerMoney(attacker,HitmanEvent.reward) outputChatBox("O player " .. getPlayerName(source) .. " está morto!",getRootElement(),255,255,255,true) outputChatBox("Matador: ".. getPlayerName(attacker) .. " ",getRootElement(),255,255,255,true) outputChatBox("Recompensa: ".. tostring(HitmanEvent.reward) .. " -") if getWeaponNameFromID(weapon) then outputChatBox("arma: ".. getWeaponNameFromID(weapon) .. "-- ") HitmanEvent.HitmanOn = false HitmanEvent.Element = nil HitmanEvent.reward = 0 else outputChatBox("A recompensa pela morte é de $0!",attacker) HitmanEvent.HitmanOn = false HitmanEvent.playerElement = nil HitmanEvent.reward = 0 end end end end end end addEventHandler("onPlayerWasted",getRootElement(),PlayerWasted) function startHitman(player, commandName,cReward) if not HitmanEvent.HitmanOn then if cReward and tonumber(cReward) > 0 then HitmanEvent.HitmanOn = true HitmanEvent.reward = cReward player = getPlayerCurtName else outputChatBox("/".. commandName .. " [Reward]",player) end else HitmanEvent.HitmanOn = false HitmanEvent.Element = nil HtmanEvent.reward = 0 end end addCommandHandler("hitman",startHitman) function isPlayerHitman(thePlayer) if player == HitmanEvent.HitmanElement then return true else return false end end HELP-ME Sorry my bad English i'm Brazilian
