Jump to content

pa3ck

Members
  • Posts

    1,141
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by pa3ck

  1. You are trying to get the players vehicle, but he is obviously not in vehicle, because the function is called when he leaves a vehicle(onVehicleExit)
  2. pa3ck

    Radar

    You can replace the circle with a rectangle I guess, but the map itself wont change if you get what I mean. Your map stays circle, but its gonna be in a rectangle.
  3. Is it the whole thing? Because I cant see where you create the grid list.
  4. This is wrong function deaOik(thePlayer, target, command) Change to: function deaOik(thePlayer, command, target) Server side the first argument is always the player ( the source ) who executes the command, second one is the command, 3rd one is the optional argument ( just like 4th, 5th etc)
  5. pa3ck

    Music

    Like: music = { {"mymusic.mp3"}, {"mymusic2.mp3"}, } addCommandHandler('music', function(cmd, song) if song == '1' then playSound(music[1]) elseif song == '2' then playSound(music[2]) end end) Is that what you need? This might be easier: music = { {"mymusic.mp3"}, {"mymusic2.mp3"}, } addCommandHandler('music', function(cmd, song) local num = tonumber(song) if num and num > 0 and num < 3 then playSound(music[num]) else outputChatBox('Invalid song number', 255, 0, 0) end end)
  6. Resource? You need a program to record, like fraps, bandicam etc.
  7. pa3ck

    Hiding GUI's

    It depends. If you're making an admin panel or something like that, which creates rows with the players then destroying and recreating would be better.
  8. pa3ck

    Help my script

    GUI and DX functions / events are all client sided. If you need something that is server side only ( getPlayerAccount, setAccountData etc) then use triggerClientEvent from server side, else do the whole script client side.
  9. local playerX, playerY, playerZ = getElementPosition(getLocalPlayer()) function draw() if getKeyState ( "tab" ) == true then dxDrawImage(screenX, screenY, width, height, "image_path") end end addEventHandler("onClientRender", root, draw)
  10. pa3ck

    Help my script

    triggerClientEvent
  11. Not with the bindKey ( you can actually, but I wouldn't use that), use onClientRender with this: if getKeyState("tab") == true then
  12. dxDrawImage or guiCreateStaticImage (both of them are client side) If you go for the dxDrawImage then you will need to render it with 'onClientRender'
  13. Remove 'local' before the function name
  14. Its server side, do you have that in your meta.xml?
  15. Oh yea, sorry, put the "setElementRotation" line to the other function. It works fine, but it rotates the player when he logs in... BTW I did not rotate the money lolol. I rotated the source, the player. Player will only spawn when he logs in, IDK if you want that.
  16. Try this: rootElement = getRootElement() function money() outputChatBox(getPlayerName(source).." has logged in!", 5, 255, 0, 0, font) setElementRotation(source, 0, 0, 270) givePlayerMoney( source, 1000 ) end addEventHandler("onPlayerLogin", rootElement, money) 'onPlayerLogin' returns source as the connected player, dont need to define it.
  17. getElementRoot? Its getRootElement... And you defined getRootElement() for rootElement, why dont you use it?
  18. function money() setPlayerMoney( source, 1000 ) end
  19. Could you post the line with the "getPedOccupiedVehicle"? The last error line is, that, you are trying to perform some maths on a value that is boolean like '<' '>'
  20. What I would do is, set /punishlog server side then trigger it to client side with the getPlayerFromName variable ( the player you want to see the GUI) and if the local player is the player you want then set the gui visible. Like: --Server addCommandHandler('punishlog', function(playerSource, command, target) local targetplayer = getPlayerFromName(target) if targetPlayer then triggerClientEvent(getRootElement(), 'openGUI', target) end end) --Client addEvent('openGUI', true) addEventHandler('openGUI', getRootElement(), function ( target ) if target == getLocalPlayer() then --set your gui visible end end)
  21. pa3ck

    Problem in xml

    Try: local xml = getResourceConfig("stream.xml") local stream = xmlNodeGetAttribute (xml, "radio stream")
  22. I guess you know that getAccountData and setAccountData is server side only.
  23. guiSetVisible is client side
×
×
  • Create New...