-
Posts
1,248 -
Joined
-
Last visited
Everything posted by WhoAmI
-
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.
-
Delete 'p' argument from getTickCount. Good job
-
I know why it doesn't work. function test () Change to function test ( p )
-
When someone hit the marker, check if 'p' is element and if getElementType ( p ) == "player". If doesn't work post your current code.
-
Remove 'p' argument from getTickCount.
-
Did you add it to mtaserver.conf?
-
you can also use function givePedWeapon together with collshape You mean giveWeapon
-
Create collshape, attach it to this vehicle. When pressing 'r' check if player is in colshape and then give him ammo.
-
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 ) ) );
-
Remember to put it server-side.
-
addEventHandler("onClientResourceStart", root, resourceStart) Change to addEventHandler("onClientResourceStart", resourceRoot, resourceStart)
-
With my code it's impossible. It will appear only if you start the resource where the code is written.
-
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 );
-
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.
-
local render = function ( ) replace it to render = function ( ) Without 'local'.
-
Yea, like that.
-
dxDrawImage doesn't return an element. If you want to destroy it, you have to removeEventHandler ("onClientRender") from render function.
-
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
-
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 )
-
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.
