Jump to content

manve1

Retired Staff
  • Posts

    1,283
  • Joined

  • Last visited

Everything posted by manve1

  1. blow's all cars still, i need only for the person chosen on the gridList
  2. after reconnect didn't add my friend, but when left, he got removed. EDIT: Jay, ur's didn't even add player's ..
  3. yes .. thats what i always do to test my scripts, use my friends, and tell them to reconnect
  4. Still the same, it stay's on
  5. it stay's on, player left game and it still was on the grid
  6. I've got same problem as with anderl
  7. I am sorry, but Anderl, the grid list player names isn't being updated EDIT: everything i tried to change, isn't updating ..
  8. hi, is there a possibility some one could change my code, so only on grid list selected player's vehicle gets fixed, blown? addEventHandler("onClientGUIClick", fix, function() if (source == fix) then vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do fixVehicle ( vehicleValue ) end end end ) addEventHandler("onClientGUIClick", blow, function() if (source == blow) then vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do blowVehicle ( vehicleValue ) end end end ) /\ these are both of them
  9. I've got a problem with the grid list. it adds the name over and over again.. never stops.
  10. I need double help, on same script but for 2 different things. ___________________________________________________________ 1. I tried making grid list with player names, but when i try making that it refreshes every 50miliseconds, i fail, so i only see other player names after restart. function playerList() local Column = guiGridListAddColumn( Grid, "Player", 0.85 ) if ( Column ) then for id, player in ipairs(getElementsByType("player")) do local Row = guiGridListAddRow ( Grid ) setTimer( function ( ) guiGridListSetItemText ( Grid, Row, Column, getPlayerName ( player ):gsub ( "#%x%x%x%x%x%x", "" ), false, false ) end ,50, 0 ) end end end addEventHandler("onClientResourceStart", root, playerList) _______________________________________________________________ 2. I'm making on same script label's which tells player name once selected on grid List the name. player_name = guiCreateLabel( 0.325, 0.1, 0.5, 0.2, "PlayerName: ", true, Wnd ) player_name2 = guiCreateLabel( 0.325, 0.1, 0.5, 0.2, "PlayerName: ".. getPlayerName ( localPlayer ):gsub ( "#%x%x%x%x%x%x", "" ), true, Wnd ) function change_name() local row = guiGridListGetSelectedItem ( Grid ) if ( row ~= -1 ) then guiSetText( player_name, guiGetText(player_name2) ) end end addEventHandler ( "onClientGUIClick", Grid, change_name, false ) ____________________________________________________
  11. some do, those which don't really know how to script ( like me ), but even i know, scripting for free isn't good
  12. manve1

    Boolen

    i get a boolen value with my script, i don't really get why it should get boolen. player_name = guiCreateLabel( 0.325, 0.1, 0.2, 0.2, "PlayerName: ", true, Wnd ) player_name2 = guiCreateLabel( 0.325, 0.1, 0.2, 0.2, "PlayerName: ".. getPlayerName(source), true, Wnd ) function change_name() local row = guiGridListGetSelectedItem ( Grid ) if ( row ~= -1 ) then guiSetText( player_name, player_name2 ) end end addEventHandler ( "onClientGUIClick", Grid, change_name, false )
  13. manve1

    Any way?

    I know, i done that wrong, so i changed after i got answer on how to get rid of color codes
  14. manve1

    Any way?

    TAPL, i changed everything u said, and my resource just didn't put gridList, so thx for a try
  15. manve1

    Don't work

    solidsnake helped me to make that player color codes won't be seen able and i tried making it to functions, but now something is actually wrong, i got messed up with it, and only check box is seen able, nothing else on the script check box: checkedBox = guiCreateCheckBox(30,330,150,20,"Color Names",false,false,Wnd) script: function updateColumnorCodes() local lists = { Grid } for _,Grid in ipairs(lists) do for Row=0,guiGridGetRowCount(Grid)-1 do guiGridSetItemPlayerName( Grid, Row, 1, guiGridGetItemPlayerName( Grid, Row, 1 ) ) end end end function guiGridSetItemPlayerName( Grid, Row, Column, name ) local hide = guiCheckBoxGetSelected ( checkedBox ) guiGridSetItemText( Grid, Row, Column, hide and removeColorCoding(name) or name, false, false ) guiGridSetItemData( Grid, Row, Column, name ) end function guiGridGetItemPlayerName( Grid, Row, Column ) return guiGridGetItemData( Grid, Row, Column ) or guiGridGetItemText( Grid, Row, Column ) end function removeColorCoding( name ) return type(name)=='string' and string.gsub ( name, '#%x%x%x%x%x%x', '' ) or name end EDIT: or if you could help me with other kinda way of an script, i don't care if its massive or not.
  16. manve1

    Any way?

    thank you very much.
  17. manve1

    Any way?

    sorry Solidsnake14, but i don't really know how to use that thing u wrote is it possible u can re-make my script? function playerList() local Grid = guiCreateGridList( 0.05, 0.1, 0.25, 0.8, true, Wnd ) local Column = guiGridListAddColumn( Grid, "Player", 0.85 ) if ( Column ) then for id, player in ipairs(getElementsByType("player")) do local Row = guiGridListAddRow ( Grid ) guiGridListSetItemText ( Grid, Row, Column, getPlayerName ( player ), false, false ) end end end setTimer( playerList, 100, 0 ) addEventHandler("onClientResourceStart", root, playerList)
  18. manve1

    Any way?

    Is there any way i can disable color codes like "#00ff00" in grid lists?
  19. fixed I forgot to change "onResourceStart" to "onClientResourceStart", that was my mistake, sorry.
  20. https://wiki.multitheftauto.com/wiki/GuiCreateGridList example one doesn't have event, so that's why i don't
  21. i got the Wnd as window .. then yes it is ..
  22. Im trying to make moderator panel and all it does is F*ck up. The problem is, i used wiki to get on my grid list player names, and the gridList isn't showing so ain't the names function playerList() local Grid = guiCreateGridList( 0.05, 0.1, 0.25, 0.8, true, Wnd ) local Column = guiGridListAddColumn( Grid, "Player", 0.85 ) if ( Column ) then for id, player in ipairs(getElementsByType("player")) do local Row = guiGridListAddRow ( Grid ) guiGridListSetItemText ( Grid, Row, Column, getPlayerName ( player ), false, false ) end end end
  23. Another problem, someone dies, it takes the player off the alive section then puts him back on but he is still dead EDIT: im using this for race DD/DM
×
×
  • Create New...