-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Yup, it was a mistake, this was part of one of my HUD system's, I guess it was intended to do something for the HUD Thanks for finding it out. Corrected the script.
-
local barrier = {} function isUser( source,name ) if isElement( source ) and type( name ) == "string" then local acc = getPlayerAccount( source ) if acc then if isObjectInACLGroup( "user."..getAccountName( acc ),aclGetGroup( name ) ) then return true end return false end return false end return false end function createBarrier ( thePlayer ) if isUser( thePlayer,"Admin" ) then -- check if player Admin for example local getTeam = getTeamFromName ("Army") if (getTeam) then local x, y, z = getElementPosition (thePlayer) if (isElement(barrier[thePlayer])) then return end barrier[thePlayer] = createObject (3578, x, y, z, 0, 0, 0) end end end addCommandHandler ("barrier", createBarrier) function removeBarrier ( thePlayer ) if isUser( thePlayer,"Admin" ) then -- check if player Admin for example if isElement( barrier[thePlayer ] ) then destroyElement( barrier[thePlayer ] ) barrier[ thePlayer ] = nil end end end addCommandHandler ("rbarrier", removeBarrier)
-
Podes usar este sitio: http://gtamap.delux-host.com/converter/ para convertir mapas al MTA.
-
Sure, if it works without any problem, then I see no problem on someone using it.
-
According to what I know, "killmessages" uses Talidan's text library. You'll have to edit the text library script to add colored texts.
-
I have no idea, let's wait and see .
-
function DestructionDerby:handleFinishActivePlayer(player) -- Update ranking board for player being removed if not self.rankingBoard then self.rankingBoard = RankingBoard:create() self.rankingBoard:setDirection( 'up', getActivePlayerCount() ) end local timePassed = self:getTimePassed() self.rankingBoard:add(player, timePassed) -- Do remove finishActivePlayer(player) -- Update ranking board if one player left local activePlayers = getActivePlayers() if #activePlayers == 1 then self.rankingBoard:add(activePlayers[1], timePassed) showMessage(getPlayerName(activePlayers[1]) .. ' Has Pwnd You All', 0, 145, 255) end end
-
That's just a mess, onZombieWasted -> server side and DX drawing functions are client side.
-
Yes, I forgot about that part, event handlers must be inside createGUI function.
-
local oldMoney = getPlayerMoney() function renderMoney() newMoney = getPlayerMoney() if ( tonumber(newMoney) ~= tonumber(oldMoney) ) then triggerEvent("onClientMoneyChange",localPlayer,oldMoney,newMoney) oldMoney = newMoney end end addEventHandler("onClientRender",root,renderMoney) addEvent("onClientMoneyChange",true) addEventHandler("onClientMoneyChange",root, function (old, new) outputChatBox(tostring(old) ..": ".. tostring(new)) end) Seems to work just fine.
-
http://bugs.mtasa.com/view.php?id=4893 Already suggested.
-
Lo de la primera foto lo editas en: "race/rankingboard_client.lua" Lo de la segunda foto lo editas en: "race/modes/base.lua" creo. Si quieres hacer esto tendras que aprender a programar en Lua. https://wiki.multitheftauto.com/wiki/ES/ ... %B3n_a_Lua
-
If the script is yours, then I don't see why you shouldn't upload it.
-
MTA RP Script SQL DB Problem [ Unsolved ] Please Help
Castillo replied to micheal1230's topic in Scripting
I'm not sure, but that is not complete. Maybe you got a fake vG copy? . -
MTA RP Script SQL DB Problem [ Unsolved ] Please Help
Castillo replied to micheal1230's topic in Scripting
Sounds like you got missing server side. -
MTA RP Script SQL DB Problem [ Unsolved ] Please Help
Castillo replied to micheal1230's topic in Scripting
That error means that one of your resources is trying to trigger a event to the server side, but the server side doesn't has it. -
-- client side: addEventHandler("onClientRender",root, function() local money = getElementData(localPlayer, "MONEY") or 0 dxDrawBorderedText(tostring(money) .." Lt",800,135,972,165,tocolor(0,180,0,255),1.1,"pricedown","left","top",false,false,false) end ) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end
-
My bad then, I should have downloaded it first, thanks for saying it before it got removed. Again, sorry for the confusion.
-
Vos sabes algo de programacion del MTA? si no es asi, entonces tendras que aprender. Esa funcion tiene argumentos: removeWorldModel ( int modelID, float radius, float x, float y, float z ) Deberias mirar el ejemplo que tiene esa pagina.
-
Mira en este post: viewtopic.php?f=91&t=36744&p=378641
-
You mean like this: Team -> Characters If so, you'll need to edit the script, and many things on it.
-
https://wiki.multitheftauto.com/wiki/RemoveWorldModel Esa funcion deberia quitar modelos en la posicion y radio que elijas. P.D: Como dice la wiki: 1.2.1 onwards.
-
function createGUI() showCursor(true) setCameraMatrix(1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) toggleAllControls(true, thePlayer, true, true) GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} rgbtn = guiCreateButton(386,360,99,20,"Inregistreaza-te",false) lgbtn = guiCreateButton(494,360,99,20,"Logheaza-te",false) un = guiCreateLabel(375,294,88,21,"Username: ",false) ps = guiCreateLabel(377,322,88,21,"Password: ",false) whatsnew = guiCreateLabel(374,405,202,19,"Ce e nou?",false) guiLabelSetHorizontalAlign(whatsnew,"center",false) thenewstuff = guiCreateLabel(384,434,191,18,"- Sistem de login/register terminat",false) uned = guiCreateEdit(443,294,103,20,"",false) psed = guiCreateEdit(443,321,103,20,"",false) upstuff = guiCreateGridList(0,0,1015,176,false) guiGridListSetSelectionMode(upstuff,2) guiSetAlpha(upstuff,0.34999999403954) downstuff = guiCreateGridList(0,592,1015,176,false) guiGridListSetSelectionMode(downstuff,2) guiSetAlpha(downstuff,0.5) addEventHandler("onClientGUIClick", lgbtn, onLogin, false) addEventHandler("onClientGUIClick", rgbtn, onRegister, false) end -- Direct X Drawing addEventHandler("onClientRender",root, function() text = dxDrawText("RDK Freeroam",277.0,162.0,411.0,219.0,tocolor(255,255,255,255),3.0,"diploma","left","top",false,false,false) end ) addEventHandler("onClientResourceStart", resourceRoot, createGUI) function onLogin() local untxt = guiGetText(uned) local pstxt = guiGetText(psed) triggerServerEvent("login", root, untxt, pstxt) end function onRegister() local untxt = guiGetText(uned) local pstxt = guiGetText(psed) triggerServerEvent("register", root, untxt, pstxt) end function logged(thePlayer) guiSetVisible(rgbtn, false) guiSetVisible(lgbtn, false) guiSetVisible(un, false) guiSetVisible(ps, false) guiSetVisible(uned, false) guiSetVisible(psed, false) guiSetVisible(upstuff, false) guiSetVisible(downstuff, false) guiSetVisible(whatsnew, false) guiSetVisible(thenewstuff, false) toggleAllControls(false, thePlayer, false, false) end addEvent("loggedin", true) addEventHandler("loggedin", root, logged)
