morir al caer de la torre
#4

Bueno, en el comando para ir a la torre usa una variable que identifique que estб en la torre, como:

pawn Код:
InTower[playerid]
o

pawn Код:
SetPVarInt(playerid, "InTower", 1);
Cuando muere, al momento del SPAWN, tienes que identificar si el jugador estб en la torre:

pawn Код:
if(GetPVarInt(playerid, "InTower") == 1)
Si lo estб, establece SetPlayerPos en la posiciуn de la torre y return.

Para obtener las coordenadas al utilizar el /comando:

pawn Код:
new Float: x, Float: y, Float: z,  i, vw;
GetPlayerPos(playerid, x, y, z);
vw = GetPlayerVirtualWorld(playerid);
i = GetPlayerInterior(playerid);
SetPVarFloat(playerid, "LastPosX", x);
SetPVarFloat(playerid, "LastPosY", y);
SetPVarFloat(playerid, "LastPosZ", z);
SetPVarInt(playerid, "LastInt", i);
SetPVarInt(playerid, "LastVW", vw);
Al /salircomando para que vuelva a su posiciуn:

pawn Код:
SetPlayerPos(playerid, GetPVarFloat(playerid, "LastPosX"), GetPVarFloat(playerid, "LastPosY"), GetPVarFloat(playerid, "LastPosZ"));
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "LastVW"));
SetPlayerInterior(playerid, GetPVarInt(playerid, "LastInt"));
Reply


Messages In This Thread
morir al caer de la torre - by chucho - 15.02.2012, 04:16
Respuesta: al caer morir - by junkbuster - 15.02.2012, 04:19
Respuesta: morir al caer de la torre - by chucho - 15.02.2012, 04:26
Respuesta: morir al caer de la torre - by junkbuster - 15.02.2012, 04:41
Respuesta: morir al caer de la torre - by Jovanny - 15.02.2012, 20:13

Forum Jump:


Users browsing this thread: 2 Guest(s)