Jump to content

Feche1320

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by Feche1320

  1. I'm using the mapratings resource, and getMapRating returns a table, but not the map rating, any way to get the map rating in a decimal number? Thanks
  2. Yes, my /cash command script-sided returns the right ammount of money. I'm using the race gamemode. Something that I discovered, if I login, money will be displayed, and when another map starts, it returns 0 again, but if I set my money, it will return the right value. Could it be a MTA bug? A temporary fix that I did is this: addEvent('onMapStarting') addEventHandler('onMapStarting', g_Root, function() for i, player in ipairs(getElementsByType('player')) do local moneys = getPlayerMoney(player) setPlayerMoney(player, moneys) end end ) It seems to be working..
  3. No.. Still not working Why the hell it returns 0??
  4. addCommandHandler('asd', function() outputChatBox(tostring(getPlayerMoney(getLocalPlayer()))) end ) This simply returns $0 to me..
  5. Show me the eventHandlers or what you use I solved that, I had to put false at the end Still having getPlayerMoney bug.. Is there any other way on getting a player's money?
  6. No, it's not the hole code, just a part. And in that client-side script its the only player variable that I have. Also, I have three buttons on my gui, and if I press at the middle of the gui for example, is like the buttons are pressed. EDIT: I still have the getPlayerMoney problem, I also tried getPlayerMoney(getLocalPlayer()) and still not working.
  7. local player = getLocalPlayer() addEventHandler('onClientGUIClick', BuyMapButton, function() local money = getPlayerMoney(player) if money > 3499 then local row, column = guiGridListGetSelectedItem(Shop) local mapname = guiGridListGetItemText(Shop, row, column) triggerServerEvent("buyMapFromPanel", getLocalPlayer(), mapname) else outputChatBox("You don't have enough money, you have $" ..tostring(money).. ", you need $3500.", 255, 0, 0) end end ) That is.
  8. I have a server-side client (/cash), and it show the right ammount, but client-side sometimes returns $0.
  9. getPlayerMoney on client-side scripts sometimes returns me 0, is it a bug?
  10. Ah LOL I didn't know (another rthing that I learned today ), thanks again
  11. This makes to tabs to be one in front of the other: UserP = guiCreateWindow(0.10, 0.15, 0.8, 0.7, getPlayerName(player).. "'s user panel:", true) Shop = guiCreateTabPanel(0.02, 0.13, 1, 0.8, true, UserP) ShopTab = guiCreateTab("Shop", Shop) Stats = guiCreateTabPanel(0.02, 0.13, 1, 0.8, true, UserP) StatsTab = guiCreateTab("Stats", Stats) I don't see the problem. Thanks
  12. I'm gonna try it, thanks Edit: Only retrieves the map name that I'm playing
  13. Hey, Im making a userpanel, and I need to get all current server maps, so people can buy them, any ideas? Thanks
  14. Ah, that was what I supposed, anyway, MTA 1.1 isn't released yet right? Thanks.
  15. This function: setVehicleColor ( vehicle theVehicle, int r1, int g1, int b1, [int r2, int g2, int b2,] [int r3, int g3, int b3,] [int r4, int g4, int b4] ) Works on 1.0.4? It says 1.1 but it isn't released?? Thanks
  16. Yep, works great, thanks guys
  17. How to attach it? AttachElementToElement doesn't work with sounds. EDIT: Just found attachElements, thanks gonna try.
  18. How can I move a 3D sound? For example, the player tipes a command and a sound starts, and I want that sound to follow the player, is it possible? Thanks.
  19. That's what I was asking for, thank you!
  20. No.. I just need this script, were else should I ask it for?
  21. Is there a getPlayerFPS?? I didn't see on Wiki. Thanks guys.
×
×
  • Create New...