How to fix SpawnPlayer() in vehicle -
Metharon - 14.08.2015
Add this stock:
pawn Code:
stock SpawnPlayerEX(playerid)
{
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPosEx(playerid, slx, sly, slz+5);
SpawnPlayer(playerid);
}
Now change everywhere in your gamemode from SpawnPlayer ==> SpawnPlayerEX
Re: How to fix SpawnPlayer() in vehicle -
Infinity - 14.08.2015
Sorry, but this is a very poor tutorial. You don't explain what was wrong in the first place and how this fixes it. You just provide a code snippet.
Furthermore, read this tutorial:
https://sampforum.blast.hk/showthread.php?tid=570635
Re: How to fix SpawnPlayer() in vehicle -
SickAttack - 14.08.2015
Quote:
Originally Posted by Infinity
|
You are still on about that? Whether he uses
stock or not, nothing is going to change. There is a difference between
how to use it and
why to use it.
Not to mention that any stock function that is not referred to, is completely skipped — as if it were lacking from the source file. But that's really up to who is the one programming, whether they leave un-used residue or not.
Tell me exactly, exactly, exactly why I should not use stock for function-accessibility if you are going to reply.
Re: How to fix SpawnPlayer() in vehicle -
Infinity - 15.08.2015
Quote:
Originally Posted by SickAttack
You are still on about that? Whether he uses stock or not, nothing is going to change. There is a difference between how to use it and why to use it.
Not to mention that any stock function that is not referred to, is completely skipped — as if it were lacking from the source file. But that's really up to who is the one programming, whether they leave un-used residue or not.
Tell me exactly, exactly, exactly why I should not use stock for function-accessibility if you are going to reply.
|
For example, you could also make every variable global, or even worse, bad indentation. It won't break anything, but it is seen as bad programming. The same goes for the (ab)use of stock in these cases. The code works, but it is technically incorrect. And when writing a tutorial I expect the writer to set a good example.
Re: How to fix SpawnPlayer() in vehicle -
SickAttack - 17.08.2015
Quote:
Originally Posted by Infinity
For example, you could also make every variable global, or even worse, bad indentation. It won't break anything, but it is seen as bad programming. The same goes for the (ab)use of stock in these cases. The code works, but it is technically incorrect. And when writing a tutorial I expect the writer to set a good example.
|
When the difference in terms of execution, use and non-use is null, exactly null, that's the last thing you should worry about when it is used for accessibility and as a benefit. As long as you know its usage, then there is no use to force yourself to do something that comes with no benefit.
And your example of the variables, has no relation to this matter. Why, you might ask. Because there are no benefits, but pure downsides.
You are also forgetting that this is SA:MP, where progress isn't really apreciated how it is with other virtual things. Progress vanishes.