25.11.2013, 23:28
I have found two bugs, and could not found them to be listed on the forum yet.
The first one is the biggest problem for me at the moment (I have created a workaround at the moment)
On our RP server it is not allowed for players to kill each other without a decent reason, therefor players
will get jailed. There are also some diseases on our server where people can lose health from or even die,
when they don't get med's on time.
This doesn't seem to be a big deal, BUT combining these two:
Let's say I accidentally punched one of the players, and about 30 minutes later he dies due to a scripted health
loss like this one (I know its not a clean code but just as an example):
Then the server/client still reports that the death was caused by me.
I created a work around with a function called 'NSetPlayerHealth(playerid, Float:health);' where I
set a variable that registers that the damage came from somewhere scripted (like not eating, decease, car crash etc)
And when a player causes the damage I set that variable on -1 (at OnPlayerTakeDamage).
But this was a way where players could kill them self by crashing into a wall after someone hit them and
causing other people to get jailed unfairly for a murder.
Now I know this is an rare use of reading the OnPlayerDeath and using SetPlayerHealth, but i do think this
should be considered as a bug?
Second bug:
Some cars do not spawn their side-skirts properly, meaning that if a car is saved with side-skirt that the
car has to be re spawned to show the side-skirts and sometimes they still disappear when a player
enters a building/virtualworld en then returns to his vehicle.
Hope the information provided here is complete enough, if just replay or PM me if you need more details.
The first one is the biggest problem for me at the moment (I have created a workaround at the moment)
On our RP server it is not allowed for players to kill each other without a decent reason, therefor players
will get jailed. There are also some diseases on our server where people can lose health from or even die,
when they don't get med's on time.
This doesn't seem to be a big deal, BUT combining these two:
Let's say I accidentally punched one of the players, and about 30 minutes later he dies due to a scripted health
loss like this one (I know its not a clean code but just as an example):
pawn Код:
//In case when a player eats food that is to old or spoiled
new Float:FoodHealth;
GetPlayerHealth(playerid, FoodHealth);
FoodHealth = FoodHealth - 45.0;
SetPlayerHealth(playerid, FoodHealth);
I created a work around with a function called 'NSetPlayerHealth(playerid, Float:health);' where I
set a variable that registers that the damage came from somewhere scripted (like not eating, decease, car crash etc)
And when a player causes the damage I set that variable on -1 (at OnPlayerTakeDamage).
But this was a way where players could kill them self by crashing into a wall after someone hit them and
causing other people to get jailed unfairly for a murder.
Now I know this is an rare use of reading the OnPlayerDeath and using SetPlayerHealth, but i do think this
should be considered as a bug?
Second bug:
Some cars do not spawn their side-skirts properly, meaning that if a car is saved with side-skirt that the
car has to be re spawned to show the side-skirts and sometimes they still disappear when a player
enters a building/virtualworld en then returns to his vehicle.
Hope the information provided here is complete enough, if just replay or PM me if you need more details.