-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
What is the error?
-
You must use this scripting function: removeWorldModel
-
dxDrawText es solo client side, y ademas se usa con onClientRender.
-
skiny = { 0, 24, 26, 44, 432 } index = 0 addEventHandler ( "onClientGUIClick", getRootElement(), function ( ) if ( source == prawobutt ) then index = ( index + 1 ) if ( skiny [ index ] ) then guiSetText ( skinidbutt, skiny [ index ] ) else index = 1 guiSetText ( skinidbutt, skiny [ index ] ) end end end ) Try that.
-
Problema con las Restrinciones de Algunos Resources
Castillo replied to TigreBlanco's topic in Scripting
Solo para que sepas, no agrege comillas y comas nada mas. De nada. -
addEventHandler("onClientDoubleClick", root, use, true) addEventHandler("onClientGUIClick", button, close) Ahi es el problema, te olvidaste de poner en 'false' cuarto argumento de addEventHandler. addEventHandler ( "onClientDoubleClick", root, use, false ) addEventHandler ( "onClientGUIClick", button, close, false )
-
You must use: setElementInterior instead of setElementPosition, like this: function motel (thePlayer) setElementInterior ( thePlayer, 0, 2216.3332844, -1150.5032888, 1025.732323227 ) outputChatBox ( "O player ".. getPlayerName(thePlayer) .." Foi para o Motel Vá tambem (/motel)", root, 0, 255, 0 ) end addCommandHandler ( "motel", motel ) Change: '0' to the interior ID of your map.
- 1 reply
-
- 1
-
-
Eso es porque el cliente aun no se cargo. local sounds = "sounds/sirena.mp3" function musica ( ) sound = playSound ( sounds ) setSoundVolume ( sound, 0.5 ) end addEventHandler ( "onClientResourceStart", resourceRoot, musica )
-
local sounds = "sounds/sirena.mp3" function checkeo ( ) triggerClientEvent ( "reproducir", getRootElement(), sounds ) end addEventHandler( "onResourceStart", resourceRoot, checkeo )
-
Es: setPedArmor no setPedArmour.
-
function adminChat ( thePlayer, commandName, ... ) local text = table.concat ( { ... }, " " ) local playerName = getPlayerName ( thePlayer ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local account = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ( "user.".. account, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user.".. account, aclGetGroup ( "SuperModerator" ) ) ) then outputChatBox ( "#FF0000[#CCCCCCAdmin#FF0000] #FF0000".. playerName .."#CCCCCC: #FF0000".. text, player, 255, 255, 255, true ) end end end addCommandHandler ( "achat", publicChat )
-
https://wiki.multitheftauto.com/wiki/ConvertNumber Con esa funcion tambien lo podes hacer. Respecto al error, talves el script lo uso como numero, y al agregarle la coma ya no sirve.
-
Si, eso es una manera. P.D: Tenes un par de errores: function comando ( player, comand, state ) if ( state == "abrir" ) then moveObject ( ) elseif ( state == "cerrar" ) then moveObject ( ) else outputChatBox ( "Syntaxis: /comando (abrir/cerrar)", player, 255, 0, 0 ) end end addCommandHandler ( "puerto", comando )
-
Problema con las Restrinciones de Algunos Resources
Castillo replied to TigreBlanco's topic in Scripting
function sayMessage ( source, command, ... ) local theText = { ... } local text = table.concat ( theText, " " ) local playerAcc = getPlayerAccount ( source ) if ( theText ) then if ( text ~= "" ) then for _, group in ipairs ( { "Admin", "Moderator", "SuperModerator", "Fundador", "VIP" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( playerAcc ), aclGetGroup ( group ) ) then outputChatBox ( "-> #FF0000Atencion: #FF4444".. text, root, 0, 153, 255, true ) break end end else outputChatBox ( "-> #FF4444Escribe el mensaje", source, 0, 153, 255, true ) end end end addCommandHandler ( "atencion", sayMessage ) Con eso deberia funcionar. -
Problema con las Restrinciones de Algunos Resources
Castillo replied to TigreBlanco's topic in Scripting
Solo si el jugador esta en todos esos grupos funcionara el comando, no se si eso es lo que querias. -
You can't warp him because the vehicle is created client side, so the server doesn't know about it. Create the vehicle server side.
-
Mind posting your script?
-
Problema con las Restrinciones de Algunos Resources
Castillo replied to TigreBlanco's topic in Scripting
aclGetGroup solo obtiene un grupo por ves, necesitas hacer un loop. -
function addplaylist ( ) if ( guiGetText ( edit1 ) ~= "" ) then local row = guiGridListAddRow ( gridlist1 ) guiGridListSetItemText ( gridlist1, row, column1, guiGetText ( edit1 ), false, false ) guiSetText ( edit1, "" ) end end addEventHandler ( "onClientGUIClick", button1, addplaylist, false ) function removeplaylist ( ) if ( guiGridListGetSelectedItem ( gridlist1 ) ~= -1 ) then local row, column = guiGridListGetSelectedItem ( gridlist1 ) guiGridListRemoveRow ( gridlist1, row ) end end addEventHandler ( "onClientGUIClick", button6, removeplaylist, false ) Error was here: addEventHandler(onClientGUIClick, button1, addplaylist()) addEventHandler(onClientGUIClick, button6, removeplaylist()) Should have been: addEventHandler ( "onClientGUIClick", button1, addplaylist, false ) addEventHandler ( "onClientGUIClick", button6, removeplaylist, false )