Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. 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 )
  2. Yes, you can use 'elseif' statements for that.
  3. 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.
  4. 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)
  5. Castillo

    login

    Primero cerra el servidor, luego cambias el archivo ACL y lo inicias de nuevo.
  6. Eso es porque el script que posteaste hace eso, esta linea: setElementModel(source,0)
  7. Castillo

    login

    Agregas otra linea debajo de "user.RomX". "resource.elNombreDelRecursoAQUI">
  8. Castillo

    login

    Postea el contenido del archivo: "acl.xml".
  9. Castillo

    login

    Pusiste el recurso en el ACL.xml grupo "Admin"?
  10. El problema es que no guarda tu skin?
  11. Busca el recurso llamado: "radar_hires" en la comunidad.
  12. No se puede remplazar o agregar animaciones.
  13. Timers aren't efficient, worst if used server side, I highly recommend you to use getTickCount instead.
  14. Use a timer to hide it after 5 seconds. setTimer
  15. 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.
  16. We don't give support with stolen scripts. Topic locked.
  17. 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" />
  18. You can just don't let them enter your server with mods, so this won't happen.
  19. Castillo

    Katana

    That's the problem of using scripts you don't anything about.
  20. What do you mean by a "ghost" user?
  21. dxDrawText tiene un argumento para que se dibuje encima del GUI.
  22. Castillo

    Katana

    You mean that the control is disabled?
×
×
  • Create New...