xXMADEXx Posted January 8, 2013 Share Posted January 8, 2013 Can someone help me make it so that this gui works properly? I want it so that it only works for Police, FBI, MIlitary, and Swat. And, i am not sure how to make the colums work. I only got the "player" colum working. Thanks in advance. function cancelPedDamage ( attacker ) cancelEvent() end addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage ) police_window = guiCreateWindow(350,205,728,380,"RoG Police Window",false) guiSetVisible(police_window, false) guiSetAlpha(police_window,1) guiWindowSetSizable(police_window,false) playerList = guiCreateGridList(14,34,699,272,false,police_window) column_name = guiGridListAddColumn(playerList,"Name",0.2) column_team = guiGridListAddColumn(playerList,"Team",0.2) column_wanted = guiGridListAddColumn(playerList,"Wanted-Level",0.2) police_closeBTN = guiCreateButton(163,325,416,36,"Close",false,police_window) bindKey("F4", "down", function ( ) --local playerTeam = getPlayerTeam ( source ) --if ( playerTeam == "Police" ) or ( playerTeam == "Military" ) or ( playerTeam == "FBI" ) or ( playerTeam == "Swat" ) then guiSetVisible(police_window, not guiGetVisible ( police_window )) showCursor(guiGetVisible ( police_window )) if ( guiGetVisible ( police_window ) ) then guiGridListClear ( playerList ) if ( column_name ) then for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column_name, getPlayerName ( player ), false, false ) guiGridListSetItemColor ( playerList, row, column_name, 255, 0, 0 ) end end if ( column_team ) then for i,team in ipairs(teams) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column_team, getTeamName(getPlayerTeam(player)), false, false ) guiGridListSetItemColor ( playerList, row, column_team, 255, 0, 0 ) end end end --end end ) -- Close Button function close() guiSetVisible(police_window, false) showCursor(false,false) end addEventHandler("onClientGUIClick", police_closeBTN, close) Link to comment
GhostXoP Posted January 8, 2013 Share Posted January 8, 2013 https://forum.multitheftauto.com/viewtop ... a725576159 Ask that guy, he probably knows. Link to comment
xXMADEXx Posted January 8, 2013 Author Share Posted January 8, 2013 https://forum.multitheftauto.com/viewtopic.php?f=91&t=52503&sid=6f4921752fc2c1da0e94d2a725576159Ask that guy, he probably knows. Nope Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now