Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. drk

    big lol

    It worked! Thanks Kenix and castillo for trying to help too
  2. drk

    big lol

    I don't need to learn this again My question is about ">" not about "source is nil". But, ok dude D: Np. I will try
  3. drk

    big lol

    Why tonumber()? the code is: elseif (money <= 5000 and > 1000) then I don't know why it needs tonumber full code: setTimer( function() local account = getPlayerAccount(source) local money = getPlayerMoney(source) if (money <= 1000) then setAccountData(account,'My Level','New User') setElementData(source,'Level','New User') elseif (money <= 5000 and > 1000) then setAccountData(account,'My Level','Regular') setElementData(source,'Level','Regular') elseif (money <= 20000 and > 1000) then setAccountData(account,'My Level','Experienced') setElementData(source,'Level','Experienced') elseif (money <= 45000 and > 20000) then setAccountData(account,'My Level','Veteran') setElementData(source,'Level','Veteran') elseif (money > 45000) then setAccountData(account,'My Level','Guru') setElementData(source,'Level','Guru') end end,500,0)
  4. drk

    big lol

    in mta 1.0.5 when I use "if (money > 500) then" it works. Now, in MTA 1.3 I get an error ( unexpected symbol near ... ) I tried with =>, >=. But don't work lol
  5. lol? Its your whole code? For this: function example(thePlayer) local playerTeam = getPlayerTeam(thePlayer) end
  6. lol, why you need to create function takeMoney??
  7. drk

    Rank System

    for the off topic question you can save in the player account or in the sqlite. If you save in SQLite, the data will be stored in internal.db ( sorry if im not right, im not sure if its on registry.db or internal.db ). For the code: First, isPedBot don't exists. Second, I think isGuestAccount need () after. Third, myAccount is nil . Fourth, If you use an statement, you don't need to use again in the same "line" like this: if example() and account and not isGuestAccount() then Fifth, you can't use variable 'money' in another function because "money" it's a local variable, you can only use in setMyRank function. Sixth, I don't know why you need to use cancelEvent()
  8. function repairVehicle(thePlayer) local veh = getPedOccupiedVehicle(thePlayer) local money = getPlayerMoney(thePlayer) if (money < 500) then outputChatBox("You don't have money!",thePlayer,255,0,0,true) else setElementHealth(veh,1000) takePlayerMoney(thePlayer,500) end end end addCommandHandler('repair',repairVehicle) function addNitro(thePlayer) local theveh = getPedOccupiedVehicle(thePlayer) local money = getPlayerMoney(thePlayer) if (money < 500) then outputChatBox("You don't have money!",thePlayer,255,0,0,true) else addVehicleUpgrade(theveh,1010) takePlayerMoney(thePlayer,500) end end end addCommandHandler('nitro',addNitro)
  9. Try changing 'Player' to 'source' or localPlayer()
  10. variable msgtype and text don't exists in your code. msgtype and text value is nil.
  11. No, because it's a built-in GTA SA "function".
  12. lol, what is 'msgtype'? 'msgtype' is nil. 'text' is nil too.
  13. drk

    [HELP]Race Problem

    And what is g_NextMap?
  14. drk

    mdc line

    I don't know why you need 'if(key == "m") then' LOL bindKey( 'm', 'down', function() if ( guiGetVisible( guiMdcWindow ) == true) then if guiGetInputEnabled() then guiSetInputEnabled( false ); outputChatBox( 'Chatbox active!', 0, 255, 0, false ); outputChatBox( 'Press "M" on the keyboard to toggle back and use the MDT' ); else guiSetInputEnabled( true ); outputChatBox( 'MDT window active!', 0, 255, 0, false ); end; end; end; end); Only more one thing, guiMdcWindow is nil, not exists.
  15. Problem solved. Lock this post please.
  16. I will send you the complete code via PM.
  17. I've tried this and don't work too. Plays all the sounds
  18. hi all. im making a script when you double click in a gridlist element it plays the sound. It is playing the song but it starts all the songs. Why? the code is function clickPlaySound() local selectedRow, selectedCol = guiGridListGetSelectedItem(gui['list']); local song = guiGridListGetItemData(gui['list'],selectedRow, selectedCol) if isElement(currentSound) then destroyElement(currentSound) end; currentSound = playSound(song,false); end; addEventHandler('onClientGUIDoubleClick',gui['list'],clickPlaySound,false); I've tried with: addEventHandler('onClientGUIDoubleClick',root, function() if source == gui['list'] then local theRow, theCol = guiGridListGetSelectedItem(gui['list']); if row and col and row ~= -1 and col ~= -1 then local song = guiGridListGetItemData(source, theRow, theCol); --i've changed source to gui['list'] and dont work too. if isElement(currentSound) then destroyElement(currentSound) end; currentSound = playSound(song,false); end; end); but don't work too. can any one help me ?
  19. LOL? Scroll down with the cursor in the objects img.
  20. I know DSL and it isn't her first map.
  21. You have to made maps more pro. This is very much easy.
  22. drk

    Nametag

    Now I get no error but dx rectangle don't appear.
×
×
  • Create New...