Complete scripting bugs list (0.3 updated)
#41

Not all animations can be cleared using ClearAnimations (which is made only for that), so you still need to use 'crry_prtial' variant.
Reply
#42

Well, I'll post here. Since I didn't really find a list of gmx bugs.

Ok, lets say you have 1 gamemode with textdraws and 1 filterscript with textdraws. After a gmx, these textdraws will mix up.
(Textdraw 1 will change to textdraws 2 position, etc.).
Reply
#43

Quote:
Originally Posted by (ed!med!
You could do that function also by yourself:

GetPlayerWeapon and then SetPlayerWeapon(it sets ammo to and isn't bugged)
GetPlayerWeapon only returns the weapon id of the weapon that the player currently has active.

SetPlayerWeapon cannot remove a weapon from a player in the manner you're speaking even when setting the given ammo to 0. You can however give them a weapon of the same slot with ammo of 0. To account for that makes the code I wrote less efficient.

Beckzyboi - what are you experiencing with SetPlayerAmmo?
Reply
#44

Quote:
Originally Posted by BeckzyBoi
a_players.inc
  • SetPlayerAmmo - Doesn't work
No, it doesn't work but you can use GivePlayerWeapon(playerid, weaponidyouwanthere, ammo);
Reply
#45

Quote:

ApplyAnimation(playerid, animlib[], animname[], Float:fS, opt1, opt2, opt3, opt4, opt5)

If you want to use timer (opt5) you need to freeze player in position (opt4 = 0) otherwise timer doesn't work. This should be fixed since we can't use animation native timer f.e. chat animations since you can't move then.
Reply
#46

Quote:
Originally Posted by BeckzyBoi
  • AllowInteriorWeapons - Doesn't work

I'm pretty sure it does work, however you can cycle through your weapons and shoot a bullet real fast.
Reply
#47

Add SetPlayerSkin to the bug list > sync stops.
Reply
#48

GetPlayerAmmo nearly always return value from previous weapon slot if you scroll weapons very quickly. Even GetPlayerWeaponData is better in that case.

GetPlayerWepaonState uses GetPlayerAmmo for it's check ans since GetPlayerAmmo values are usually wrong we get wrong weapon state.

If you use GivePlayerWeapon/SetPlayerAmmo on existing weapon which you have in active weapon slot, GetPlayerWeaponData won't retrieve right ammo value on next OnPlayerUpdate (it will return old value).
For example, I have AK47 with 50 ammo and I use GivePlayerWeapon to give myself M4 -> everything alright.
And if I have AK47 with 50 ammo and use GivePlayerWeapon/SetPlayerAmmo to give you some more ammo GetPlayerWeaponData will return old value on first update.
Reply
#49

Quote:
Originally Posted by $ЂЯĢ
GetPlayerWeaponData won't retrieve right ammo value on next OnPlayerUpdate (it will return old value).
For example, I have AK47 with 50 ammo and I use GivePlayerWeapon to give myself M4 -> everything alright.
And if I have AK47 with 50 ammo and use GivePlayerWeapon/SetPlayerAmmo to give you some more ammo GetPlayerWeaponData will return old value on first update.
GetPlayerWeaponData also misbehaves if you are holding certain weapons in certain slows and then you enter a vehicle where you can do drive-bys. The drive-by weapon's ammo count gets reported onto the weapon that you were holding when you entered the vehicle. Example: I have an rpg with 10 ammo and an mp5 with 500. If I get in a vehicle while holding the rpg, rpg ammo will start showing as 500 along with mp5 ammo showing as 500.
Reply
#50

Quote:
Originally Posted by Sergei
Посмотреть сообщение
1. I don't know what you want me to read, but it's definitely a bug.
2. Then you are very special person.
3.
nemises is right, it works fine. I think you're the special one here.
Reply
#51

Found an inaccuracy with Limit of objects in 0.3b.
Wiki.sa-mp.com says server can hold up to 400 objects. I checked, that the highest valid object ID is 399.
There are maximum of 399 (not 400) objects as they start from 1.
Reply
#52

really Oo

I allways thought the fire will continue burning.


But it's no bug, that you can run underwater, that's one of sa-mps best features
Reply
#53

Then a player exits Tram, the camera doesn't updated. Sorry for my bad english.
Reply
#54

RemovePlayerFromVehicle doesn't work properly on bikes when player is driving backwards or forward when there's passenger on:



Also there's some funny bug related to damage status of car:



it's not problem of mod, happened to me on unmodified Roadtrain too (and ONLY on Roadtrain AFAIK)
Reply
#55

AFAIK this list is up to date, unless anybody knows any other scripting bugs that I haven't listed?
Reply
#56

Quote:
Originally Posted by gesior7
Посмотреть сообщение
Found an inaccuracy with Limit of objects in 0.3b.
Wiki.sa-mp.com says server can hold up to 400 objects. I checked, that the highest valid object ID is 399.
There are maximum of 399 (not 400) objects as they start from 1.
Sorry about this, but they start from 0, not 1? - They will only start from 1 if you have a hidden object at 0 surely?

I might be wrong because i havent had time to test, but ive definetly had an object at id 0.
Reply
#57

GetPlayerWeaponData sometimes doesn't always work the way it should.
For example, if you give a player lots of weapons, then GetPlayerWeaponData for all weapon slots, sometimes it just returns old values of data.

If you use OnPlayerUpdate(playerid) after giving weapons and before GetPlayerWeaponData, it always works.

Maybe stating the obvious, but this is good for making sure what weapons a player really has.
Reply
#58

Quote:
Originally Posted by Lenny
The connecting client does not notice a namechange (SetPlayerName) that occurs OnPlayerConnect, probably because it isn't fully connected until after the function is called and thereby isn't "notified" about it.
https://sampforum.blast.hk/showthread.php?tid=184128
Reply
#59

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.
Reply
#60

If enter (PutPlayerInVehicle) to vehicle type: Trailer... (Vehicle ID: 610, 611 etc), and than leave this car, game client is close with error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)