-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Podes cambiar la imagen con guiStaticImageLoadImage.
-
That's because that doesn't make much sense, looks like you copied random code from other scripts. function open ( ) vent = guiCreateWindow(485, 185, 314, 385, "lol", false) guiWindowSetSizable(vent, false) guiSetVisible ( vent, false ) fy = guiCreateButton(9, 31, 296, 58, "xd", false, vent) wr = guiCreateButton(9, 259, 296, 58, "xd", false, vent) elely = guiCreateButton(13, 94, 77, 30, "xxd", false, vent) dblef = guiCreateButton(222, 94, 77, 30, "xxd", false, vent) ea = guiCreateButton(13, 323, 77, 30, "xxdd", false, vent) dblewa = guiCreateButton(222, 323, 77, 30, "xxdd", false, vent) imagen = guiCreateStaticImage(13, 133, 292, 120, "lol.png", false, vent) end addEventHandler ( 'onClientResourceStart', resourceRoot, open ) function windowopen ( ) guiSetVisible ( vent, not guiGetVisible ( vent ) ) showCursor ( guiGetVisible ( vent ) ) end bindKey ( 'f1', 'down', windowopen ) P.S: "onPlayerJoin" is server side.
-
De nada.
-
GUIEditor = { gridlist = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(417, 171, 547, 361, "ZombieVille Tienda de Armas", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.99) GUIEditor.gridlist[1] = guiCreateGridList(21, 42, 218, 296, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Arma:", 0.9) guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "M4", false, false) function crearm4 ( ) local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local arma = guiGridListGetItemText ( source, row, 1 ) if ( arma == "M4" ) then guiCreateStaticImage ( 94, 40, 147, 126, ":admin/client/images/info.png", false, GUIEditor.window[1] ) end end end addEventHandler ( "onClientGUIClick", GUIEditor.gridlist[1], crearm4, false )
-
Eso no tiene sentido.
-
To lock/unlock a vehicle use: setVehicleLocked isVehicleLocked and this function to get player vehicle: getPedOccupiedVehicle
-
local ld = dbQuery ( hconnect, "SELECT `Guns` FROM `users` WHERE `Name`=?", username ) local result = dbPoll ( ld, -1 ) local guns = fromJSON ( result [ 1 ].Guns ) if ( type ( guns ) == "table" ) then for _, weapon in pairs ( guns ) do if ( weapon.gun and weapon.ammo ) then outputChatBox ( tostring ( weapon.gun ) ..", ".. tostring ( weapon.ammo ) ) giveWeapon ( source, weapon.gun, weapon.ammo ) else outputChatBox ( "No weapon data" ) end end end See what it returns.
-
avaibleSkins = { 10, 12, 15, 45 } local currentSkin = 1 function nextSkin ( ) currentSkin = ( currentSkin + 1 ) if ( avaibleSkins [ currentSkin ] ) then outputChatBox ( "Skin selected: ".. avaibleSkins [ currentSkin ] ) end end function previusSkin ( ) currentSkin = ( currentSkin - 1 ) if ( avaibleSkins [ currentSkin ] ) then outputChatBox ( "Skin selected: ".. avaibleSkins [ currentSkin ] ) end end
-
Make sure these variables are defined.
-
Y para abrirlo usa la funcion: https://wiki.multitheftauto.com/wiki/Se ... rOpenRatio
-
Define a variable with the current table index, then when you want to go back, decrease it by 1, and when you want to go forward, increase it by 1. Then you can do. local skin = avaibleSkins [ myVariable ]
-
Vi que en tu script tenias: "rango1" y "rango2" como comandos y en el script ponias 0 y 1, asi que supuse que necesitaba ser -1.
-
exports.scoreboard:addScoreboardColumn('Rango',getRootElement(),1,10,'Rango') addCommandHandler ( "rango", function ( player, _, who, rank ) local playerWho = getPlayerFromName ( who ) if ( playerWho ) then local rank = tonumber ( rank ) if ( rank ) then setElementData ( playerWho, "Rango", ":PDz_ranks/rangos/".. tostring ( rank - 1 ) ..".png" ) end end end ) addCommandHandler ( "rangopdz", function ( player ) setElementData ( player, "Rango", "" ) setElementData ( player, "Rango", ":PDz_ranks/rangos/202.png" ) end ) --Guardado de medallas function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local rangos = getElementData(source,"Rango") setAccountData ( playeraccount, "Rango", rangos ) end end function onPlayerLogin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local rangos = getAccountData ( playeraccount, "Rango" ) if ( rangos ) then setElementData ( source, "Rango", rangos ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogout", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
-
function sv ( thePlayer, _, ... ) local data = table.concat ( { ... }, " " ) if tonumber ( data ) then model = tonumber ( data ) else model = getVehicleModelFromName ( data ) end local x, y, z = getElementPosition ( thePlayer ) local createdVehicle = createVehicle ( model, x, y, z ) if ( createdVehicle ) then warpPedIntoVehicle ( thePlayer, createdVehicle ) end end addCommandHandler ( "sv", sv )
-
That's because trigger(Server)ClientEvent doesn't return data, it only returns true or false.
-
I just tested it and works fine, I wrote: "/sv 411" and it spawned me an Infernus.
-
"slots" es un numero y lo estas usando como elemento, supongo que ya tendras una label o algo llamado "slots", pero si definis otra variable con el mismo nombre, no servira.
-
No pregunte a que se supone que devuelva, sino que devuelve.
-
Did you put this script as server side?
-
"maxsSlots" que devuelve?
-
De nada.
-
onClientGUIClick guiCheckBoxGetSelected
-
That's because if it doesn't has nitro, it'll return '0'. if ( enableNitro ) and ( getVehicleUpgradeOnSlot ( theVehicle, 8 ) ~= 0 ) then NitroLevel = getVehicleNitroLevel( theVehicle ) nx1, ny1, nx2, ny2 = sx*(355.0/1440),sy*(759.0/900),sx*(27.0/1440),sy*(116.0/900) nx3, ny3, nx4, ny4 = sx*(360.0/1440),sy*(871.0/900),sx*(18.0/1440),NitroLevel*sy*(-108.0/900) nx5, ny5, nx6, ny6 = sx*(360.0/1440),sy*(763.0/900),sx*(18.0/1440),sy*(108.0/900) end