30.05.2010, 15:59
How can i do this, if a player dies, that he need to
wait 1 minute and then spawn at hospital.??
wait 1 minute and then spawn at hospital.??
Originally Posted by boelie
make each city an 'area'
then put under onplayerdeath if isplayerinarea setplayerpos (hospital location) |
new DIED[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(DIED[playerid] == 1)
{
SetPlayerPos(...)
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
DIED[playerid] = 1;
return 1;
}
Originally Posted by ViruZZzZ_ChiLLL
What he means is :
pawn Код:
|
Originally Posted by Ihsan_Cingisiz
How can i do this, if a player dies, that he need to
wait 1 minute and then spawn at hospital.?? |
Originally Posted by boelie
Quote:
|
public OnPlayerSpawn(playerid)
{
if(DEAD[playerid] == 1)
{
TogglePlayerControllable(playerid, 0);
SetCameraPos(...) // looking at the hospital.
SetPlayerCameraLookAt(....);
SetTimer("DEAD1", 60000, true);
}
return 1;
}
forward DEAD1();
public DEAD1()
{
TogglePlayerControllable(playerid, 1);
return 1;
}
Originally Posted by ViruZZzZ_ChiLLL
Quote:
pawn Код:
|