drk
Members-
Posts
1,607 -
Joined
-
Last visited
Everything posted by drk
-
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)
-
lol? Its your whole code? For this: function example(thePlayer) local playerTeam = getPlayerTeam(thePlayer) end
-
lol, why you need to create function takeMoney??
-
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()
-
Please show the whole code.
-
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)
-
Try changing 'Player' to 'source' or localPlayer()
-
variable msgtype and text don't exists in your code. msgtype and text value is nil.
-
No, because it's a built-in GTA SA "function".
-
lol, what is 'msgtype'? 'msgtype' is nil. 'text' is nil too.
-
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.
-
Problem solved. Lock this post please.
-
I will send you the complete code via PM.
-
I've tried this and don't work too. Plays all the sounds
-
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 ?
-
LOL? Scroll down with the cursor in the objects img.
-
I know DSL and it isn't her first map.
-
You have to made maps more pro. This is very much easy.
