-
Posts
1,283 -
Joined
-
Last visited
Everything posted by manve1
-
blow's all cars still, i need only for the person chosen on the gridList
-
after reconnect didn't add my friend, but when left, he got removed. EDIT: Jay, ur's didn't even add player's ..
-
yes .. thats what i always do to test my scripts, use my friends, and tell them to reconnect
-
Still the same, it stay's on
-
it stay's on, player left game and it still was on the grid
-
I've got same problem as with anderl
-
I am sorry, but Anderl, the grid list player names isn't being updated EDIT: everything i tried to change, isn't updating ..
-
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
-
I've got a problem with the grid list. it adds the name over and over again.. never stops.
-
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 ) ____________________________________________________
-
some do, those which don't really know how to script ( like me ), but even i know, scripting for free isn't good
-
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 )
-
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.
-
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)
-
fixed I forgot to change "onResourceStart" to "onClientResourceStart", that was my mistake, sorry.
-
https://wiki.multitheftauto.com/wiki/GuiCreateGridList example one doesn't have event, so that's why i don't
-
i got the Wnd as window .. then yes it is ..
-
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
-
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