Jump to content

Xeno

Members
  • Posts

    728
  • Joined

  • Last visited

Everything posted by Xeno

  1. Thats awesome. Would there be a way to do something like /setRank [name] [rank] ? Or is that not possible at all?
  2. Yes, that is exactly what I need... But I need to setElementData with it, so I can do something like /setrank Awesome I gave it ago...: function sayHello(thePlayer, cmd, who) if (who and who ~= "") then local player = getPlayerFromName(who) if (not player) then outputChatBox("This player does not exists.",thePlayer,255,0,0) return end setElementData(player,"Rank","Awesome") end end addCommandHandler("setRank",sayHello) But I guess this wouldn't work..
  3. Sorry, I'm rubbish at explaining: I mean like one of these, for example, /jail [playername] I need to know how to make one of these^
  4. Ok, I don't really know whats it called, but I know it has a specific name... I want to know how to do one of them /setmoney [name] [cash] -- But I have no clue how, could you give me some way to do this? Thanks, Xeno.
  5. bin = createObject(1337,0,0,5) -- Creating a dust din at the coods 0,0,0 function moveBin() local x,y,z = getElementPosition(bin) moveObject(bin,x+10,y,z) end addCommandHandler("move", moveBin) This script moves the bin at 0, 0, 0 by 10 meters. ( Not tested lol)
  6. Xeno

    Gridlists.

    Ah sorry, i should of known of to fix that. Thanks for all your help.
  7. Xeno

    Gridlists.

    Error at local row,col = guiGridListGetSelectedItem(playerList) -- Expected GUI element.
  8. Xeno

    Gridlists.

    Sorry to bring back an old topic, but this does not work... It won't output "hi" into the chat box when I select my name, here is the code: function createPlayerList (player) --Create the grid list element local playerList = guiCreateGridList ( 0.60, 0.10, 0.15, 0.60, true ) button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Do", 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, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) end end end addCommandHandler("show",createPlayerList) addEventHandler("onClientGUIClick",button, function () local row,col = guiGridListGetSelectedItem(playerList) if (row and col and row ~= -1 and col ~= -1) then local playerName = guiGridListGetItemText(playerList, row, 1) outputChatBox("Hi ") end end, false)
  9. Xeno

    Custom cars

    1. Don't talk on this topic anymore, use email. 2. Its fixed.
  10. Xeno

    Gridlists.

    so in the client I would use local name = getPlayerFromName(playerName)
  11. Xeno

    Gridlists.

    Thank you, Could I replace outputChatBox("Hi ".. playerName) with setPlayerTeam(playerName, team1) -- I know I would have to do a triggerServerEvent ?
  12. Xeno

    Gridlists.

    So yeah, I've never done GUI gridlists, so I would like some help... Here is a wiki example of a guiGridList with a table of players on it (Edited abit) function createPlayerList () --Create the grid list element local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Do", 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, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) end end end What I'm trying to achieve is, when the player presses "button" it outputs into the chat box "hi" I'm guessing you gotta use GuiGridListGetSelectedItems but i have no idea where to use it.. I would appreciate if you guys could help me, Xeno.
  13. Xeno

    Custom cars

    Check your email buddy.
  14. Xeno

    setCameraMatrix

    Well, setCameraMatrix works, but, i can't seem to rotate the camera and I don't know why. setCameraMatrix(source, 73.6,1763,48, 1468.388671875, -918.42474365234, 0, 0,25000) -- The last 25000 doesn't work at all, it doesn't turn the camera at any number.. Please help D:
  15. Xeno

    Zombie safe area

    Thanks, I'll test it later.
  16. Once you have looked at the scripts, pm me what you need I MAY be able to help you ( don't get your hopes up, I'm not the best scripter )
  17. What don't you like about it? Position of it, or how it looks? Expand on what you want.
  18. This would proberly cost a lot more than a few dollars, I don't know the exact price.
  19. I made a safe area that stops zombies getting into an area, although the zombies die, they spawn in the area, and then die and it looks terrible... Is there a way to stop this. Xeno
  20. Sorry for the double post, but I have another problem. I'm trying to destroy dxDrawText after a few seconds, I set a timer on it but it does not seem to disapear.. local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local maxrange = 6 function NPCnametag() local pedX,pedY,pedZ = getElementPosition(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition (pedX,pedY,pedZ) local cameraX,cameraY,cameraZ = getCameraMatrix() if sx then if getDistanceBetweenPoints3D(cameraX,cameraY,cameraZ,pedX,pedY,pedZ) <= maxrange then dxDrawText("hi",sx,sy-100,screenWidth, screenHeight+2,tocolor ( 255, 0, 0, 255 ), 2,"sans") end end end function HandleTheRendering() addEventHandler("onClientRender",rootElement, NPCnametag) setTimer(dxDrawRe,1000,1) end addEvent("HandleTheRendering", true) addEventHandler("HandleTheRendering", getRootElement(), HandleTheRendering) function dxDrawRe() removeEventHandler("onClientRender", rootElement, HandleTheRendering) end Please help. Xeno
×
×
  • Create New...