-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Just use getElementData.
-
he want to set the walking style whem he write on console "s" addEventHandler ( "onElementModelChange", root, addCommandHandler ( "s", function ( _, newModel ) if ( newModel == 132 ) then setPedWalkingStyle ( source, 10 ) else setPedWalkingStyle ( source, 0 ) end end ) ) Would you please read the topic? @Mr.X001: addEventHandler ( "onElementModelChange", root, function ( _, newModel ) if ( newModel == 132 ) then setPedWalkingStyle ( source, 10 ) elseif ( newModel == 118 ) then setPedWalkingStyle ( source, 45 ) else setPedWalkingStyle ( source, 0 ) end end )
-
Yes, you can use 'elseif' statements for that.
-
addEventHandler ( "onElementModelChange", root, function ( _, newModel ) if ( newModel == 132 ) then setPedWalkingStyle ( source, 10 ) else setPedWalkingStyle ( source, 0 ) end end ) This will set it when your skin changes.
-
function saveClothes() local account = getPlayerAccount(source) if ( not isGuestAccount(account) ) and ( getElementModel(source) == 0 ) then local texture = {} local model = {} for i=0, 17, 1 do local clothesTexture, clothesModel = getPedClothes(source, i) if ( clothesTexture ~= false ) then table.insert(texture, clothesTexture) table.insert(model, clothesModel) else table.insert(texture, " ") table.insert(model, " ") end end local allTextures = table.concat(texture, ",") local allModels = table.concat(model, ",") outputDebugString("Clothessaver: Saved clothes") setAccountData(account, "Clothessaver:Texture", allTextures) setAccountData(account, "Clothessaver:Model", allModels) texture = {} model = {} end end addEventHandler("onPlayerQuit", getRootElement(), saveClothes) function setClothes() local account = getPlayerAccount(source) if ( not isGuestAccount(account) ) then local textureString = getAccountData(account, "Clothessaver:Texture") local modelString = getAccountData(account, "Clothessaver:Model") local textures = split(textureString, 44) local models = split(modelString, 44) for i=0, 17, 1 do if ( textures[i+1] ~= " " ) then addPedClothes(source, textures[i+1], models[i+1], i) end end outputChatBox("Clothes were added by clothessaver", source, 0, 255, 0) textures = {} models = {} end end addEventHandler("onPlayerLogin", getRootElement(), setClothes) function loadClothes(player) local account = getPlayerAccount(player) if ( not isGuestAccount(account) ) then local textureString = getAccountData(account, "Clothessaver:Texture") local modelString = getAccountData(account, "Clothessaver:Model") local textures = split(textureString, 44) local models = split(modelString, 44) for i=0, 17, 1 do if ( textures[i+1] ~= " " ) then addPedClothes(player, textures[i+1], models[i+1], i) end end outputChatBox("Clothes were added by clothessaver", player, 0, 255, 0) textures = {} models = {} else outputChatBox("Please login!", player, 255, 0, 0) end end addCommandHandler("loadClothes", loadClothes) function saveClothes(player) local account = getPlayerAccount(player) if ( not isGuestAccount(account) ) then if ( getElementModel(player) == 0 ) then local texture = {} local model = {} for i=0, 17, 1 do local clothesTexture, clothesModel = getPedClothes(player, i) if ( clothesTexture ~= false ) then table.insert(texture, clothesTexture) table.insert(model, clothesModel) else table.insert(texture, " ") table.insert(model, " ") end end local allTextures = table.concat(texture, ",") local allModels = table.concat(model, ",") outputDebugString("Clothessaver: Saved clothes") setAccountData(account, "Clothessaver:Texture", allTextures) setAccountData(account, "Clothessaver:Model", allModels) texture = {} model = {} else outputChatBox("Your skin must be skin 0 (CJ Skin)", player, 255, 0, 0) end else outputChatBox("Please login!", player, 255, 0, 0) end end addCommandHandler("saveClothes", saveClothes)
-
Primero cerra el servidor, luego cambias el archivo ACL y lo inicias de nuevo.
-
Eso es porque el script que posteaste hace eso, esta linea: setElementModel(source,0)
-
Agregas otra linea debajo de "user.RomX". "resource.elNombreDelRecursoAQUI">
-
Postea el contenido del archivo: "acl.xml".
-
Pusiste el recurso en el ACL.xml grupo "Admin"?
-
El problema es que no guarda tu skin?
-
¿Como saber el numero de textura?
Castillo replied to Tonyx97's topic in Ayuda relacionada al cliente/servidor
Busca el recurso llamado: "radar_hires" en la comunidad. -
No se puede remplazar o agregar animaciones.
-
Timers aren't efficient, worst if used server side, I highly recommend you to use getTickCount instead.
-
Use a timer to hide it after 5 seconds. setTimer
-
To make a key do something, you need to bind it, for that, use the following function: bindKey And to make it show/hide a GUI, you must use: guiGetVisible -- To get the visibility status. guiSetVisible -- To set the visibility status. And to show/hide the cursor: isCursorShowing -- Returns the cursor visibility. showCursor -- Sets the cursor visibility.
-
We don't give support with stolen scripts. Topic locked.
-
In the "mtaserver.conf" you can set which resource will start with the server, by default, it starts "play" gamemode. This line: "play" startup="1" protected="0" /> Just change it to your game mode resource name. "myCustomGameMode" startup="1" protected="0" />
-
You can just don't let them enter your server with mods, so this won't happen.
-
That's the problem of using scripts you don't anything about.
-
What do you mean by a "ghost" user?
-
dxDrawText tiene un argumento para que se dibuje encima del GUI.
-
You mean that the control is disabled?