Save Pos ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Save Pos ? (
/showthread.php?tid=249470)
Save Pos ? -
marinov - 19.04.2011
I'm working on this thing where when a player in this team dies, it creates a gangzone next to him, and then I'm using a timer to check if a player is the same area, how can I save the pos when the player dies to later on use it on IsPlayerInArea (not the same player, ANY player) ?
Re: Save Pos ? -
blackwave - 19.04.2011
pawn Код:
enum pInfo
{
Float:x,Float:y,Float:z
};
new PPos[MAX_PLAYERS][pInfo]
Now you just gets player pos and put on this array:
pawn Код:
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
PPos[playerid][x] = X;
PPos[playerid][y] = Y;
PPos[playerid][z] = Z;
Re: Save Pos ? -
marinov - 19.04.2011
Quote:
Originally Posted by blackwave
pawn Код:
enum pInfo { Float:x,Float:y,Float:z }; new PPos[MAX_PLAYERS][pInfo]
Now you just gets player pos and put on this array:
pawn Код:
new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X, Y, Z); PPos[playerid][x] = X; PPos[playerid][y] = Y; PPos[playerid][z] = Z;
|
Thats the problem I'm having, I dont want to save that pos to a player, I need to save the pos for everyone (not playerid)
Re: Save Pos ? -
blackwave - 19.04.2011
pawn Код:
for(new v; v < MAX_PLAYERS; v++) {
IsPlayerConnected(v)) {
new Float:X,Float:Y,Float:Z;
GetPlayerPos(v, X, Y, Z);
PPos[v][x] = X;
PPos[v][y] = Y;
PPos[v][z] = Z;
Re: Save Pos ? -
marinov - 19.04.2011
I dont want to check A PLAYER'S POS, i want to check A POS (a pos thats not related to no one)
Re: Save Pos ? -
Steven82 - 19.04.2011
Well you have to get the players position, then adjust the cords like this:
pawn Код:
0.0+1.0, 0.0+5.0, 0.0+0.5
X Y Z
Re: Save Pos ? -
marinov - 19.04.2011
I know that, but I want to save a pos to use it later on
Re: Save Pos ? -
marinov - 21.04.2011
bump
Re: Save Pos ? -
marinov - 23.04.2011
bump
Re: Save Pos ? -
marinov - 25.04.2011
bump