Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. That's not bad design, but it doesn't look really professional. This blur shader in background isn't that good, because this blur could be more sensitive.
  2. Delete 'p' argument from getTickCount. Good job
  3. I know why it doesn't work. function test () Change to function test ( p )
  4. When someone hit the marker, check if 'p' is element and if getElementType ( p ) == "player". If doesn't work post your current code.
  5. Remove 'p' argument from getTickCount.
  6. Did you add it to mtaserver.conf?
  7. WhoAmI

    ammo

    you can also use function givePedWeapon together with collshape You mean giveWeapon
  8. WhoAmI

    ammo

    Create collshape, attach it to this vehicle. When pressing 'r' check if player is in colshape and then give him ammo.
  9. dbQuery ( function ( q, player ) local p = dbPoll ( q, 0 ); if ( p ) then dbExec ( db, "UPDATE `main` SET `deaths`=?, `matches`=? WHERE `account`=?", tonumber ( p[1]["deaths"] ) + 1, tonumber ( p[1]["matches"] ) + 1, getAccountName ( getPlayerAccount ( player ) ) ); end end, {source}, db, "SELECT `deaths`,`matches` FROM `main` WHERE `account`=? LIMIT 1", getAccountName ( getPlayerAccount ( source ) ) );
  10. Remember to put it server-side.
  11. WhoAmI

    Help!

    Post your current code again.
  12. WhoAmI

    Help!

    addEventHandler("onClientResourceStart", root, resourceStart) Change to addEventHandler("onClientResourceStart", resourceRoot, resourceStart)
  13. WhoAmI

    Help!

    With my code it's impossible. It will appear only if you start the resource where the code is written.
  14. WhoAmI

    Help!

    addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setCameraMatrix(-688, 930, 50, 1468.388671875, -918.42474365234, 99.881813049316) fadeCamera(true, 1) btnLogin = guiCreateButton(316, 469, 75, 31, "Login", false) btnRegister = guiCreateButton(662, 467, 75, 31, "Register", false) usrEdit = guiCreateEdit(436, 340, 169, 26, "", false) passEdit = guiCreateEdit(435, 394, 169, 26, "", false) guiEditSetMasked(passEdit, true) end );
  15. Do it serverside. setWeaponProperty is serverside function. addEventHandler ( "onResourceRoot", resourceRoot, function ( ) setWeaponProperty ( 38, "pro", "damage", 1 ); setWeaponProperty ( 38, "std", "damage", 1 ); setWeaponProperty ( 38, "poor", "damage", 1 ); setWeaponProperty ( 38, "poor", "weapon_range", 1 ); setWeaponProperty ( 38, "std", "weapon_range", 1 ); setWeaponProperty ( 38, "pro", "weapon_range", 1 ); end ); Remember to put it SERVER-SIDE.
  16. local render = function ( ) replace it to render = function ( ) Without 'local'.
  17. dxDrawImage doesn't return an element. If you want to destroy it, you have to removeEventHandler ("onClientRender") from render function.
  18. WhoAmI

    Connect to IRC

    https://wiki.multitheftauto.com/wiki/IR ... pting_Help https://wiki.multitheftauto.com/wiki/Resource:Irc https://community.multitheftauto.com/index.php?p= ... ils&id=731
  19. function printAmountOfAccounts ( thePlayer ) local accountTable = getAccounts () if #accountTable > 0 then local n = 0 for _, account in pairs ( accountTable ) do local money = getAccountData ( account, "nordea-cash" ); if ( money >= 500000 ) then n = n + 1; end end outputChatBox ( "There is " .. n .. " accounts with >= 500000 money.", thePlayer ); end end addCommandHandler( "accountcount", printAmountOfAccounts )
  20. addEvent ( "requestUpdating", true ); function updateSongs ( ) local file = xmlLoadFile ( "songs.xml" ) if ( file ) then local t = { }; for _, data in pairs ( xmlNodeGetChildren ( file ) ) do local name, length, played = xmlNodeGetAttribute ( data, "name" ), xmlNodeGetAttribute ( data, "length" ), tonumber ( xmlNodeGetAttribute ( data, "played" )) t[name] = {length, played} end triggerClientEvent ( source, "onLoadTable", source, t ); end xmlUnloadFile ( file ) end addEventHandler ( "requestUpdating", root, updateSongs ) Has to work, lel.
×
×
  • Create New...