Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. Mujhe farak nahi parta tha ki konsi country ke hein, likin ye talibans ko to mar kar gadha mein fak thana chahiya. #budho talibans
  2. I tried that, it'd not still get fixed.
  3. Thank you! I just get the data while it's triggering to client! Add / delete will come in next version. I'm trying to figure some things ougt!
  4. Ok I was researching for clicks on buttons. I got it but, I'm expierencing a issue I'm having multiple buttons so I'm using up a loop now the problem is Button 1 Button 2 Button 3 Button 4 Button 5 If I click button 1 no problem If I click button 2:it outputs button 1 then button 2 If I click button 3:it outputs button 3 then button 1 then button 2 If I click button 4:it outputs button 4 then button 3 then button 1 then button 2 If I click button 5:it outputs button 4 then button 3 then button 1 then button 5 then button 2 What could be the problem? addEventHandler( "onClientClick", root, function( button, state, x, y ) if (button == "left") and (state == "up") and (showing) then local index = 0 for i, v in pairs( rules ) do index = index + 1 if ( x >= rules[ i ].acceptX and x <= rules[ i ].acceptX + rules[ i ].acceptW and y >= rules[ i ].acceptY and y <= rules[ i ].acceptY + rules[ i ].acceptH ) then currentText = rulesInfo[ index ] if colorSet then rules[ colorSet ].color = tocolor( 255, 255, 255, 255 ) end colorSet = false rules[ i ].color = tocolor( 255, 0, 0, 255 ) colorSet = i outputChatBox( tostring( colorSet)) end end end end )
  5. Come on , seriously? what so hard at creating HUDS? dxDrawImage dxDrawText dxDrawRectangle getElementHealth getPlayerMoney getPedTotalAmmo Can be done in 30 minutes.... Ok just don't reply this, if you want to go at skype. No fights or offense please but it's not easy for everyone. I create every gui using guiGetScreenSize( which takes me alot of time ). And I'm not good in designing so much so it looks bullshit
  6. ----- Features: - DX Window - A selecting menu - A gui to edit the things in it ---- I realy can't explain so much, you won't need to do edit from files. It's gonna be stored in SQLite database
  7. Hi again I haven't released resources in some weeks, so I decided to make on DX Information system. This is just a idea now, I'm trying to think the design and do it. Remember it's status IS WIP. I'm working on it right now! Progress: Screenshots: The main base: http://i.imgur.com/0WBJzVN.png -> This is not photoshop, I just made this window now. I'm working on the functions of it now! Features - DX GUI working with the database and the database system with settings of tabs - DONE - GUI for editing things with the data - Not DONE
  8. LekRoots, you are not doing anything. You are not even seeing the post of WASSim, if you don't understand, try to do it. You'll understand yourself, we are not going to MAKE SCRIPTS FOR YOU as you tell. Use the db* functions. Use getPlayerSerial and getPlayerName. triggerClientEvent dxDrawText It's so easy, you can make a HUD but not this? Seems that you are copying them from a site
  9. See the example 3 @ https://wiki.multitheftauto.com/wiki/SetElementPosition
  10. The problem is at the elseif and if statments, when you are comparing and checking if the value is that, it's not a string. like this: elseif destination == rrg change it to "rrg"
  11. Sorry if I'm posting something wrong, but hey dude: Mainly all scripters are working on thier servers, they have no time for this. Some people have exams?
  12. Never use element data for SUCH THINGS. You can use tables always! Element data uses alot of memory and CPU as far as I have listened. bankbalances = {} addEventHandler("onAccountDataChange", root, function (account, key, value) local thePlayer = getAccountPlayer(account) if (thePlayer and key == "bank.balance") then bankbalances[ thePlayer ] = value triggerClientEvent( "onClientRequestBankBalance", thePlayer, bankbalances ) end end) addEventHandler("onPlayerLogin", root, function (_, account) local alldata = getAccountData( getPlayerAccount(source), "bank.balance" ) bankbalances[ source ] = alldata triggerClientEvent( "onClientRequestBankBalance", thePlayer, bankbalances ) end) addEventHandler("onPlayerLogout", root, function (_, account) if bankbalances[ source ] then bankbalances[ source ] = nil end end) Client: balancesClient = {} function getPlayerBankMoney( player ) if balancesClient[ player ] then return balancesClient[ player ] else return false end end addEvent( "onClientRequestBankBalance", true ) addEventHandler( "onClientRequestBankBalance", root, function( table ) balancesClient = table end ) BTW: You can ask for help on skype: anubhav.agarwal80, i'd be happy to help you out. If you need further assistance with the code feel free to contact me!
  13. The best option would be: interpolateBetween
  14. You have to make a .php file and use PHP SDK. In PHP file you've to use the API so it returns perfectly!
  15. [lua] groups = { { r = 0, b = 0, g = 0, a = 255 }, {r = 0, g=0, b=0, a=255},{r=0,g=0,b=0,a=255}} addEventHandler("onClientRender", root, function ( ) dxDrawText( ) dxDrawText( ) dxDrawText( ) -- you have to divide your string into 3 parts somehow then for first text you can use the color code: groups[textNumber].r and as you see -- here keep changing the alpha if you want to lighten and darken -- then check if the alpha is 255 of last one first if it's then do it to first one end )
  16. If you use my idea, then create onClientRender and see if the 3rd text's alpha is that which you want.
  17. You can create 3 texts and set thier alpha differently.
  18. Ok guyz, I figured this. It's realy easy! Go to zombie_server.lua Replace line 6 - 18 with this: if ZombieSpeed == 0 then --super slow zombies (goofy looking) chaseanim = "WALK_drunk" checkspeed = 2000 elseif ZombieSpeed == 1 then -- normal speed chaseanim = "WALK_drunk" checkspeed = 1000 elseif ZombieSpeed == 2 then -- rocket zombies (possibly stressful on server) chaseanim = "WALK_drunk" checkspeed = 680 else -- defaults back to normal chaseanim = "WALK_drunk" checkspeed = 1000 end
  19. He already figured it out.
  20. John, the error's are clear. You also have not corrected everything. function savePlayerData( ) -- those events use other arguments such as weapon and such in the function so you have used weapon as the player which doesnt make any sense, remember, source of events is a player, read through wiki local playeraccount = getPlayerAccount( source ) if ( playeraccount ) then local isPlayerInClass = getPlayerTeam( source ) if ( ( isPlayerInClass ) and not isGuestAccount( playeraccount ) ) then -- Here was a nil value: It was playeraccount but you wrote it account! Be carefull! setAccountData( playeraccount, "save.Player.Class", getTeamName( isPlayerInClass ) ) end end end addEventHandler( "onPlayerQuit", root, savePlayerData ) addEventHandler( "onPlayerLogout", root, savePlayerData ) addEventHandler( "onPlayerWasted", root, savePlayerData ) function loadPlayerData( )-- same like line 2 in this function local playeraccount = getPlayerAccount( source ) -- same thing here as line 2 if (playeraccount) then local isPedInClass = getAccountData( playeraccount, "save.Player.Class" ) if ( ( isPedInClass ) and getTeamFromName( isPedInClass ) ) then setPlayerTeam( source, getTeamFromName( isPedInClass ) ) end end end addEventHandler( "onPlayerLogin", root, loadPlayerData ) -- Here was onPlayerQuit, so you have to load it when player logins. --addEventHandler("onPlayerLogout", root, loadPlayerData) I commented this line because you don't need to load the data while the player logouts, because when you login it'll be there! addEventHandler( "onPlayerWasted", root, loadPlayerData ) addEventHandler( "onPlayerLogin", root, function( ) loadStats( getPlayerAccount( source ), source ) -- you need to pass source(a player in this case) to function so that you can define the player in completely another function end ) addEventHandler( "onPlayerQuit", root, function( ) saveStats( getPlayerAccount( thePlayer ), source ) -- same like line 28 end ) addEventHandler( "onPlayerLogout", root, function( ) saveStats( getPlayerAccount( thePlayer ), source )-- same like line 28 end ) addEventHandler( "onPlayerWasted", root, function() loadStats( getPlayerAccount( source ), source ) -- player who died is source, and not thePlayer. read wiki through end ) function saveStats( Acc, thePlayer ) for i = 69 , 79 do setAccountData( thePlayer, "stat."..tostring( i ) , getPedStat( thePlayer, i ) ) end end function loadStats( Acc, thePlayer ) for i = 69 , 79 do setPedStat( thePlayer, i, getAccountData( Acc, "stat."..tostring( i ) ) ) -- Here and above, the i is a number and there's a string. And in account data values are in string only. end end EDIT-1: I indented it also! Re-read all the comments.
  21. He is from Pakistan, so I think Urdu and why are you posting this? Dude, I think it's in the README file of MTA PARADISE. On github at root directory there's a big white portion, there it might be there
×
×
  • Create New...