19.01.2013, 19:57
DeathOnaStick,
thanks, but
and then
I'm getting
and the game is starting to lag heavily when SetPlayerPos is called with this code and almost hangs my PC.
------------------------------------------------
The thing is that I'm trying to declare variables (or constants) equal to player's current coordinates and then, after changing player's coordinates a few times, set his coordinates back to those.
If I just declare variables equal to x, y, z, they're changing along with player's position and later, when player calls to SetPlayerPos, he teleports right to the same place where he's standing at the moment, not to his previous location...
thanks, but
pawn Code:
new Float:pos[3],Float:Angle;
GetPlayerPos(i,pos[0],pos[1],pos[2]);
GetPlayerFacingAngle(i,Angle);
new const lesX = pos[0]; //2668
new const lesY = pos[1]; //2669
new const lesZ = pos[2]; //2670
new const lesA = Angle; //2671
pawn Code:
SetPlayerPos(i,lesX,lesY,lesZ);
SetPlayerFacingAngle(i,lesA);
I'm getting
pawn Code:
C:\SAMP\mod1.pwn(2668) : warning 213: tag mismatch
C:\SAMP\mod1.pwn(2669) : warning 213: tag mismatch
C:\SAMP\mod1.pwn(2670) : warning 213: tag mismatch
C:\SAMP\mod1.pwn(2671) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 5272 bytes
Code size: 1115648 bytes
Data size: 3882756 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4922 cells (19688 bytes)
Total requirements: 5020060 bytes
4 Warnings.
and the game is starting to lag heavily when SetPlayerPos is called with this code and almost hangs my PC.
------------------------------------------------
The thing is that I'm trying to declare variables (or constants) equal to player's current coordinates and then, after changing player's coordinates a few times, set his coordinates back to those.
If I just declare variables equal to x, y, z, they're changing along with player's position and later, when player calls to SetPlayerPos, he teleports right to the same place where he's standing at the moment, not to his previous location...