OnPlayerDeath Spawn :S
#1

Hey fellow men and women xD
i have a problem,
on OnPlayerDeath i want the player to spawn somewhere (Similar To a Holding Place, I Already have it set up)
And after a certain time(Settimer Perhaps?) i want him to spawn again

Ive tried making it and failed miserably :/

Please Help?? D:
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
  //Set the co-ords of the holding place
  SetTimerEx("Out", /*The time here in milliseconds*/, false, "d", playerid);
  return 1;
}

forward Out(playerid);
public Out(playerid)
{
  //Set the new player co-ords.
  return 1;
}
Reply
#3

Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
public OnPlayerSpawn(playerid)
{
  //Set the co-ords of the holding place
  SetTimerEx("Out", /*The time here in milliseconds*/, false, "d", playerid);
  return 1;
}

forward Out(playerid);
public Out(playerid)
{
  //Set the new player co-ords.
  return 1;
}
Thanks Man, But i have factions, and it doesnt work :S? D: lol
I Have 3 Factions, Al Queda, Police, And US Army if that helps..
and if anyone one of them die i want them to spawn in the same place
and after there time is up maybe SpawnPlayer(playerid);?
Reply
#4

Bump.
Reply
#5

Код:
public OnPlayerSpawn(playerid)
{
  //Set the co-ords of the holding place
  SetTimerEx("Out", /*The time here in milliseconds*/, false, "d", playerid);
  return 1;
}

forward Out(playerid);
public Out(playerid)
{
  if(Police[playerid] == 1)
  {
   SetPlayerPos(..)
  }
 else if(army[playerid] == 1)
  {
   SetPlayerPos(..)
  }
  return 1;
}
Reply
#6

If I understood you correctly that you want to set a player's position after his death, do this

pawn Код:
new Died[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid)
{
Died[playerid] = 1;
}


public OnPlayerSpawn(playerid)
{
if (Died[playerid] == 1) {
SetPlayerPos(playerid, X,Y,Z);
return 1;
}
}
Reply
#7

Quote:
Originally Posted by TheNotorius
Bump.
You can't bump after like 30 mins...
As quoted by Kaisersouse,
Quote:

Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.

Which means you need to wait 12 hours before you can bump, not 30 minutes...
Reply
#8

Quote:
Originally Posted by Hannes
Quote:
Originally Posted by TheNotorius
Bump.
You can't bump after like 30 mins...
As quoted by Kaisersouse,
Quote:

Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.

Which means you need to wait 12 hours before you can bump, not 30 minutes...
Oh...Im Sorry I Didnt Know D:
Reply
#9

EDIT: Please Remove
Problem Is Solved, BTW Thanks Guys For Your Help!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)