Coords not saving right
#3

Quote:
Originally Posted by Runn3R
Посмотреть сообщение
pawn Код:
GetPlayerPos(playerid,x,y,z);
PlayerInfo[playerid][pPos_x] = x;
PlayerInfo[playerid][pPos_y] = y;
PlayerInfo[playerid][pPos_z] = z;

What's the point of this? Local variables are much faster than global arrays.

Just use x, y, z instead hence you already created them localy.


And by the way if you are doing a script from scratch that's an awful way to save your stuff like that.

Lets make a reference here:

Imagine yourself eating something, would it be better if you stuff your whole sandwich in your mouth or piece by piece while eating it?
Uh... give me an example of how I should save them then?
I shouldn't have a global save function? And call every thing where it is needed? Like, save the money when they update, save the location when the player quit, save the skin when it changed, things like this?


Also I used x,y,z instead of global but coords still save wrong sometimes..
Reply


Messages In This Thread
Coords not saving right - by AndreiWow - 31.01.2017, 12:14
Re: Coords not saving right - by Runn3R - 31.01.2017, 12:30
Re: Coords not saving right - by AndreiWow - 31.01.2017, 12:36
Re: Coords not saving right - by Runn3R - 31.01.2017, 12:39
Re: Coords not saving right - by AndreiWow - 31.01.2017, 12:44
Re: Coords not saving right - by Runn3R - 31.01.2017, 12:46
Re: Coords not saving right - by AndreiWow - 31.01.2017, 12:50
Re: Coords not saving right - by princejeet1510 - 31.01.2017, 12:55
Re: Coords not saving right - by AndreiWow - 31.01.2017, 12:58
Re: Coords not saving right - by Runn3R - 31.01.2017, 17:00

Forum Jump:


Users browsing this thread: 2 Guest(s)