Good forum. I hope some bugs will be fixed in new version of samp. Because fixing all in script not easy. I have installed 0.3b version of server.
So for me it is not good version. Only two real plus I see, now better works GetPlayerWeaponData.
But not so good, in vehicle I can check normally only ammo for slot4. Weapons and other ammos return wrong often.
More over I cant understand why weapons with out ammo, show random ammo values (for example knife) and weapons with emзty ammo don't disappear and showing with 0 ammo in GetPlayerWeaponData.
And armor, health and guns don't automatically give or restore in public vehicles. Still giving parachute and golf club. For why? Passenger sometimes don't get parachute.
Samp client can't enter server with rcon password. So then for what server properties, rcon password in menu? It is boring allways type rcon command. Sometimes you can just miss "/" symbol and all players will see rcon password.
OnDialogResponse works strange, normally left button is cancel or back when right is ok or next. When pressed esc it is like pressing left button, when enter like right. In that function when you press enter return response=1 (left button), when esc - right with response=0. So my menu looks not usual, left button OK, right cancel.
GetPlayerAnimationIndex often show wrong animations, for example after walk (not run), after shooting, ... ApplyAnimation often don't work from first apply and sometimes don't sync with other players. In 0.3a nice work enter and exit vehicle animations. In 0.3b often when car jacking driver just teleport on vehicle roof. When jacking heli , driver just killed by propeller blade.
I think bad idea to prevent exit passengers from moving Airplanes. For example driver exit on height, vehicle falling, passengers can't exit until it stop falling.
When killing in vehicle (car, plane (heli can't kill, why? maybe bug too)) from staying on victim (not just pushing it) onplayerdeath returns wrong death reason (killed by propeller blade).
Two pizza shops don't have icons on map.
Show stadium enters after DisableInteriorEnterExits.
I thing server logging in file and in console should have option turning it off. For example in my mod I use my own logging system, and that logs in server_log.txt just making server run slower. More over /rcon reloadlog don't work.
Good function attach players to vehicles but only for boats. I think it should be manual turn on or off for each player. Try attached get in mod shop or teleport with vehicle.
Very usefull pickup allowing teleport players in vehicles type=14 , disappears after pickup until player get out stream_distance. And why no pickup type for teleport players on food and vehicles.
Often Vehicles left after health less then 250 out of stream_distance from some one, just left on that place and when some one come back in stream_distance vehicle continue explode from beginning and then disappear from game map and don't respawn. Normaly it should respawn instantly after disappearing, I think it should have parameter like respawn all death vehicles after 1-x minutes.
GetVehiclePos should get the x, y and z position of a vehicle in variables, but it get only last position in stream_distance if vehicle out of stream_distance. When SetVehiclePos works good always.
GetVehicleZAngle return strange values not angles. Often they don't change when vehicle turning and change when it stay still or moving straight. So get vehicle angle is impossible. But get vehicle angle function very useful. SetVehicleZAngle works fine.
Sometimes players with big ping (more then 60) can exit from vehicle in mod shops and become trapped.
In 99% Vehicles with model ID: 400, 418, 438, 500 (Las Venturas) and 489, 500 (San Fiero ) return from mod shop and freeze in textures about +4.5 on z coordinate. So player become trapped in mod texture.
Armed vehicle bad (or not) sync with players not in it. Petrol explosions bad (or not) sync with players not in some vehicle, Sometimes in some. Passenger see explosion but don't die and vehicle don't get damage, because driver don't see explosion.
Plane Hydra can cross 820 height up to 1000 in z coordinate.
Strange thinks happen after player go in game menu (press esc). For example: driver and passenger in car (more funny in plane). Driver get in esc on speed, then back. So passenger see that car continue driving straight. When driver back, car just teleport to driver esc position. Another example. Driver drive car, passenger
go in esc, driver get out, passenger back from esc. First passenger teleport in esc position then empty car teleport to him and sometimes passenger putting in car. SO I think should be added function testing is player in game menu (press esc). Do it with function OnPlayerUpdate imposible, becouse he can press esc on only short time. And perhaps don't unsync players in game menu with server.
I cant understand how work function OnPlayerUpdate. From wiki: This callback is called everytime a client/player updates the server with their status. So why when in server.cfg onfoot_rate 40 incar_rate 40
that means max possible ping 25 , ping show sometimes less then 10 (that means update rate more then 100) and OnPlayerUpdate runs only one time if player stay still. So in my opinion that three values must work together. onfoot_rate 40 should privent ping going less then 25 and work OnPlayerUpdate faster then 25 times per second. And OnPlayerUpdate should work 1000/ping per second times.
Some words about pawn:
Sometimes functions SetTimerEx and SetTimer with repeating flag true just dont start repeating function, for that error I use them in repeating functions end with repeating flag false.
Really good function SetVehicleNumberPlate and turned off.
I think will be good function checking nearest vehicle for player, checking is player attached to vehicle,
checking is player in water, checking player virtual world change. Good to see not only in OnPlayerText function variant return 0 to stop this function, but in another like OnPlayerPickUpPickup, OnVehicleMod, and so on.
Compiler don't check arrays limits for example:
tables.inc
stock ZoneCheckTimer[5] =
{...}
mod.pwn
#include <a_samp>
#include "../include/tables.inc"
...
for (i=0;i!=1000;++i)
{...ZoneCheckTimer[i]...}
Compiler don't see errors.
I can't understand how work arrays with memory:
new x[10] take 40 bytes in amx. (why not 10)
new boolean
take 1 byte (why not bit)
For example I often use in pawn vars with type boolean, byte, word, integer, not longint, but all take memory like longint or byte for boolean. So I hope will be add set var type functions. Like Byte
, Word
and so on.
Another strange example. That works equal, but first variant allow creating different var arrays and looks more understandable:
new x[10][5] (take 10*5 bytes but in program each can easy store longint)
//aanother one
enum NewType
{
a, b, c, d, e
}
new x[10][NewType] (take 10*5*4 bytes)
In result my server takes about 3 times more memory for that strange auto type system.
Fast write and read functions fblockwrite and fblockread, they should work faster then fgetchar fputchar, but work bad. They always read and write each var minimum 4 bytes long. Writing text like "test" in file will be "t e s t ".
ps. I just starting creating my GTA SA mod for SAMP. When I find more bugs I write. Big thanks for all SAMP team for your work and good luck to debugging.