Anderl
Members-
Posts
2,266 -
Joined
-
Last visited
Everything posted by Anderl
-
for index, cPlayer in PAIRS(getElementsByType( "player" )) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText ( GUIEditor_Grid[1], row, money_TAB, tostring(getPlayerMoney( cPlayer )), false, false ) end Did you see your error, Alpha?
-
Can you stop doing double posting and try to fix the error instead of asking here for fix every time a error appears?
-
What do you want to make? Install a forums system or pay for someone develop one for you? lol
-
By default, settings are: Host: localhost User: root Password: Database: localhost
-
Hi! Is there a way to hide the transfer bar? I didn't find anything related. I hope someone can help me.
-
https://nightly.multitheftauto.com/mtasa-1.4-unstable-4151-20120526-net41D4.exe Is that hard to download 1.4 Development?
-
As far as I know, custom DX functions doesn't support custom fonts. You should use dxDrawText as it has now colorCoded parameter.
-
LOL This guy is crazy or what? Topic title: "A userpanel I made and edited..." Topic text: "ost a userpanel that I edited. This userpanel came from my friend which sucked and with my little LUA knowledge, I managed to make something bigger and more impressive to look at." I believe that you didn't make it cause you don't know, basically, nothing of LUA. You should put author rights.
-
Are the username and password correct?
-
if (country == nil or false) then lolwhat? nil and false are, basically, the same. If it's nil, it's false.
-
Stop copy + paste. That will never work.
-
That's wrong Jaysds1, this doesn't do what he wants. I think you can do that: function getAuthorFromMap ( pMap ) if ( pMap ) then return getResourceInfo ( pMap, 'author' ); end end -- getAuthorFromMap ( getResourceFromName ( getMapName ( ) ) ); return: -- map author
-
Your code is TOTALLY fucked up, really. You should learn more about LUA. Try that: local aAnims = { { "RIOT", "RIOT_ANGRY"; }, { "RIOT", "RIOT_ANGRY_B"; }, { "RIOT", "RIOT_challenge"; }, { "RIOT", "RIOT_CHANT"; }, { "RIOT", "RIOT_FUKU"; }; } -- addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) bindKey ( "i", "down", wndShow ); -- for index, anim in pairs ( aAnims ) do aHGUI = { }; aHGUI[index] = guiGridListAddRow ( guiElement2 ); guiGridListSetItemText ( guiElement2, aHGUI[index], guiElement5, aAnims[i][1], false, false ); guiGridListSetItemText ( guiElement2, aHGUI[index], guiElement6, aAnims[i][2], false, false ); end end ) -- wndShow = function ( ) guiSetVisible ( guiElement1, not guiGetVisible ( guiElement1 ) ); showCursor ( guiGetVisible ( guiElement1 ) ); end addEventHandler ( "onClientGUIClick", elementGroup, function ( ) if ( source == guiElement3 ) then local row, col = guiGridListGetSelectedItem ( source ); if ( row and col and row ~= -1 and col ~= -1 ) then local chBlock = guiGridListGetItemText ( source, row, guiElement5 ); local chAnim = guiGridListGetItemText ( source, row, guiElement6 ); triggerServerEvent ( "onElementAnimation", localPlayer, chBlock, chAnim ); end elseif ( source == guiElement4 ) then guiSetVisible ( guiElement1, false ) showCursor ( false ); end end )
-
I know, that's why I said "or simply delete the files when them are downloaded.".
-
guiElement should be an array. http://lua-users.org/wiki/TablesTutorial
-
if ( tonumber ( recipient ) ) then for _, pPlayer in ipairs ( getElementsByType 'player' ) do if ( tonumber ( recipient ) == getElementData ( pPlayer, 'id' ) ) then local pTarget = pPlayer; break; end end else local pTarget = getPlayerByName ( recipient ); end
-
I don't know why these tutorials are useful when you can use protected meta subnode or simply delete the files when them are downloaded.
-
Since he is using getAccount, getPlayerAccount is not needed.
-
Morphine Item Does'nt Do else Code if health is not 100
Anderl replied to micheal1230's topic in Scripting
You should check the wiki before asking those things: elseif ( itemID == 152 ) then if ( getElementHealth ( source ) < 100 ) then -- is element 'source' defined? -- send message exports['global']:sendLocalMeAction ( source, 'Injects some morphine into himself.' ); -- define 'source' element health to 100 setElementHealth ( source, 100 ); -- if health is not smaller than 100 else -- take 50% of 'source' element health setElementHealth ( source, getElementHealth ( source ) - 50 ); -- send message exports['global']:sendLocalMeAction ( source, 'Injects some morphine into himself and starts to feel dizzy.' ); end end -
You should use MySQL database system and create a table for bought items and when a player buys a item, insert player name, item bought, ... And when you want to get all bought items just search in the table all rows where player name is the name you want. Understand?
-
I suggest you to use MySQL instead and insert each item in the table.
-
Amazing job, keep it up!