Jump to content

aintaro

Members
  • Posts

    135
  • Joined

  • Last visited

Everything posted by aintaro

  1. Ok thanks for information, i'll try on a blank gamemode
  2. Nop did not work, I clicked my name on the gridlist but nothing printed out
  3. Anybody please could help me with guigridlist?
  4. Hello guys, I'm having a problem with my gridlist, I first load players in the list and whenever I want to click them it does not print their name in the outputchat box, Why does this code not work? --Create the gridlist with players in function createPlayerList () -- Create the grid list playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) -- Create a players column in the list local column = guiGridListAddColumn( playerList, "Player", 0.85 ) if ( column ) then -- If the column has been created, fill it with players for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end addEventHandler ( "onClientGUIClick", playerList, click ) end end --addEventHandler ( "onClientResourceStart", getRootElement(), createPlayerList ) --handle the player click when he clicks on a gridlist item function click ( button, state, sx, sy, x, y, z, elem, gui ) -- if state is down ( not to trigger the function twice on mouse button up/down), clicked gui and the element is our player list if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then -- get the player name from the selected row, first column local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) outputChatBox ( playerName ) -- output it to chat box end end --This function is called when we start the client addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components createPlayerList () -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end ) Thanks in advance, Greetz Aintaro
  5. Okay thanks, I was thinking about doing that, to bad mta does not have a function to display a character model on an interface. Thanks for the information.
  6. Hello guys, I was wondering if its possible to display your character skin on a interface and update it while they select an other skin. Thanks in advance, greetz, Aintaro
  7. I should of knoww that the client side did not send a parameter "thePlayer", Thanks for that solidsnake14. 1 as for the giveWeapon function I did not know that it was server sided only, so thanks aswell KRZO. Greetz, Aintaro
  8. local shop1 = createMarker ( 1930, -1776, 12.5, "cylinder", 1.5, 255, 255, 0, 170 ) function duty(thePlayer, matchingDimension) if isElementWithinMarker(thePlayer, shop1) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty) This is what I have and it does not work, it keeps returning "You are not at the right place" even tho I'm on the exact spot where the marker is created, Any help? edit: I'm doing this client sided Thanks in advance, Aintaro
  9. Hello guys, Do you need to make a new acl every time you make a new gamemode or does the acl that belongs in handles all the gamemodes?Thanks for reading please help.
×
×
  • Create New...