Jump to content

HUNGRY:3

Members
  • Posts

    395
  • Joined

  • Last visited

Everything posted by HUNGRY:3

  1. thanks but getWeaponFromName Doesn't exist but I changed it and it works
  2. I tested it, it works just put it in server side
  3. Ok GTX one more question i did some thing in the script that gets the weapon name not the id but the question is i want to change "fist" in grid to "none" which function should i use and which event? Thanks.
  4. all of them are 0 function test(player) for i=0, 12 do outputChatBox(getPedWeapon(player, i)) end end addCommandHandler("seeguns",test)
  5. but... how to get all of the player weapons? and make them go in the gridlist? is there any way?
  6. thank you it gave me an idea
  7. First it doesn't get all of the player weapons Second i did something to refresh it but it get spammed in the grid
  8. hello i'm trying to get the all of the player guns and put it in the gridlist but when i add another gun it doesn't go in code: client = getLocalPlayer() function addwep() local invrow = guiGridListAddRow(gridlist) local wep = getPedWeapon(client) if (wep) then guiGridListSetItemText ( gridlist, invrow, invcol, getWeaponNameFromID(wep), false, false ) else if guiGridListGetItemText (gridlist, invrow, invcol) == getWeaponNameFromID(wep) then guiGridListRemoveRow(gridlist,getWeaponNameFromID(wep)) end end end addEventHandler ( "onClientResourceStart", getRootElement(), addwep )
  9. just replace this in server.lua --[[ original script by Justus (GA_Justus) --]] 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) setElementModel(source,0) 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) setElementModel(player,0) 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 addEventHandler("onPlayerLogin",root,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 addEventHandler("onPlayerQuit",root,saveClothes)
  10. he says that he don't want command to save..
  11. then replace command /saveclothes with this addEventHandler("onPlayerQuit",root,saveClothes)
  12. use this to get players fps getTickCount()
  13. https://community.multitheftauto.com/in ... ls&id=1868
  14. HUNGRY:3

    Cinema

    https://community.multitheftauto.com/ind ... s&id=11851
  15. lol look if guiGridListGetItemText (yourgrid, row, col) == "nameoftherowgrid" then -- if this is selected guiGridListRemoveRow(yourgrid,nameoftherowgrid) -- nameoftherowgrid -- will be removed
  16. hello my friend get an error when he connect to my server other players can connect but he can't....
  17. maybe this? function clicked () local row, col = guiGridListGetSelectedItem (yourgrid) if source == yourgrid then if guiGridListGetItemText (yourgrid, row, col) == "nameoftherowgrid" then guiGridListRemoveRow(yourgrid,nameoftherowgrid) end end end addEventHandler("onClientGUIClick", root, clicked)
  18. it's working tho. Lol
  19. Download it here: https://community.multitheftauto.com/ind ... s&id=11851
  20. Create team with admin name or use gtx functions
  21. https://community.multitheftauto.com/in ... ls&id=7947
  22. HUNGRY:3

    Browser

    line 39 loadBrowserURL(webBrowser, getBrowserURL(GUIEditor.edit[1])) i used guiGetText screen shot: function brow() if source == GUIEditor.button[1] then loadBrowserURL(webBrowser2, guiGetText(GUIEditor.edit[1])) addEventHandler("onClientRender", root, webBrowserRender) end end addEventHandler("onClientBrowserCreated", webBrowser2, brow) addEventHandler("onClientGUIClick",root,brow)
×
×
  • Create New...