Save Pos ?
#1

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) ?
Reply
#2

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;
Reply
#3

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)
Reply
#4

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;
Reply
#5

I dont want to check A PLAYER'S POS, i want to check A POS (a pos thats not related to no one)
Reply
#6

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
Reply
#7

I know that, but I want to save a pos to use it later on
Reply
#8

bump
Reply
#9

bump
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)