[Ajuda] Morrer em Gangzone
#1

Eae galera, eu criei uma gangzone que serб o local de dm, e gostaria que quando o player morresse dentro dessa бrea ele desse respawn nessa бrea msm, o meu code:

Код:
new SpawnBloqueado;

public OnPlayerSpawn(playerid)
{
	if(SpawnBloqueado == 1)
	{
    	        new Random = random(sizeof(RandomSpawns));
                SetPlayerInterior(playerid, 0);
		SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1],RandomSpawns[Random][2]);
    	        SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
	}
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInDM(playerid))
    {
        SpawnBloqueado[playerid] = 1;
    }
	return 1;
}

IsPlayerInDM(playerid)
{
	new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(x >= -484.7343 && y >= 2301.6531 && x <= -313.4499&& y <= 2176.6023) return 1;
    else return 0;
}
Reply


Messages In This Thread
Morrer em Gangzone - by BartWhite - 27.08.2015, 22:02
Re: Morrer em Gangzone - by iTakelot - 27.08.2015, 22:18
Respuesta: Morrer em Gangzone - by BartWhite - 27.08.2015, 22:28
Re: Morrer em Gangzone - by iTakelot - 27.08.2015, 22:29
Respuesta: Morrer em Gangzone - by BartWhite - 27.08.2015, 22:39

Forum Jump:


Users browsing this thread: 2 Guest(s)