XX3, you may find this useful: https://community.multitheftauto.com/index.php?p= ... ils&id=234
I made it as an example to show people how to make peds that follow you but I also added health bars which can be shown/hidden.
What's the point of 2 timers?
Just use one and for the last parameter use a number of how many times you want the timer to call the randomVehColors function... If your timer has interval of 250 then set 3rd param to 112
(1000 / 250 = 4 * 28 = 112)
If it's 500 then use 56
(1000 / 500 = 2 * 28 = 56)
So, you have a chance to make it work.
I'm worried that cheaters' weapons aren't synced but getPedWeapon client-side will get these weapons and if you save them then they'll have "cheated" weapons saved. Maybe that's what he meant..
varez, I don't get it why, you take away smaller value from larger value and convert it to positive value... What's the point? Why not simply swap the order and get the same value w/o multiplying negative value by -1?
a = (30 - 50) * -1
-- is equivalent to:
a = 50 - 30;
i installed it and now dosnt even save his current
You can get all player weapons in client-side script and send them to the server with triggerServerEvent or you can use setElementData which can sync the data but is unsafe.
Load what into them?
If you want to store coords in tables, then just put them in. You can use map files to store coords in them but this is different.
But if you mean, take those coords out of the table then you do it like in PAWN:
x1, y1, z1 = tab[ 1 ][ 1 ], tab[ 1 ][ 2 ], tab[ 1 ][ 3 ];
x2 = tab[ 2 ][ 1 ];
y2 = tab[ 2 ][ 2 ];
z2 = tab[ 2 ][ 3 ];
Check "/debugscript 3" command and see if you get an error. I'm pretty sure you get an error saying something like "call to function scoreboardAddColumn failed". If you do get it, I can't help you since I've never managed to call exported functions, even gamemodes like "race" fail to call votemapanger functions so once race is complete, nothing happens.
This timer will call AutoFix function only once and if this code is not attached to any event, it will be called once after resource starts. I'd suggest to add a command:
function AutoFix ()
-- your code in AutoFix is fine
end
addCommandHandler( "fixall", AutoFix )
If you want the timer to call your AutoFix function unlimited amount of times every second then use 0 for the 3dr parameter (which is 1 in your code).
It would work varez but unfortunately ALTER TABLE doesn't work in MTA. http://www.sqlite.org/lang_altertable.html
It's a bug or "feature" or it's blocked for "security reason".
In theory, you could copy the table where you want to add a column, create a new table with a new column and copy all the data from old table (the backup table) to the new one.
http://www.sqlite.org/faq.html#q11
But it didn't work either when I tried it long time ago.