I don't respawn when I die?
#1

Hey, I had the problem before.
When I die my player got 0 health. But it doesn't respawn.
I only can walk around and chat. I cannot use commands or enter a car.
But when I join of a building or something I finaly die?
whats the problem? I had this problem before I forgot how to solve it.
Something with virtualworlds?
Reply
#2

Show your OnPlayerDeath and OnPlayerUpdate...
Reply
#3

I don't got onplayerupdate.
Код:
 public OnPlayerDeath(playerid, killerid, reason)
{
  SetPlayerVirtualWorld(playerid,0);
  pStats[playerid][Spawned] = 0;
  pStats[playerid][Loading] = -1;
  TextDrawSetString(LoadingObj[playerid]," ");
  	if(pStats[playerid][UsingAnim])
	{
    pStats[playerid][UsingAnim] = 0;
    TextDrawHideForPlayer(playerid,txtAnimHelper);
	}
  	if(pStats[killerid][Zone] == 1 || pStats[killerid][Zone] == 3)
	{
	  SendDeathMessage(killerid, playerid, reason);
  		if(pStats[playerid][Admin] >= 1)
		{
			if(pStats[killerid][Zone] == 1) { SendClientMessage(killerid, Green, "Newkill: You received $10.000 and 1 Points for murder an Admin!"); GivePlayerCash(killerid,10000); pStats[killerid][Points]++; }
			if(pStats[killerid][Zone] == 3) { SendClientMessage(killerid, Green, "Newkill: You received $20.000 and 2 Points for murder an Admin!"); GivePlayerCash(killerid,20000); pStats[killerid][Points]+=2;}
		}
		else
		{
			if(pStats[killerid][Zone] == 1) { SendClientMessage(killerid, Green, "Newkill: You received $5.000 and 1 Points for this murder"); GivePlayerCash(killerid,5000); pStats[killerid][Points]++;}
			if(pStats[killerid][Zone] == 3) { SendClientMessage(killerid, Green, "Newkill: You received $10.000 and 2 Points for this murder"); GivePlayerCash(killerid,10000); pStats[killerid][Points]+=2; }
		}
	}
	return 1;
}
Uhm I have to put SetPlayerVirtualWorld in onplayerupdate isn't?
Reply
#4

I'm probably wrong based on the fact i havent scripted in 2 years but where does it says to set him to the spawn and the cords?
Reply
#5

Were are you talking about?
Normaly it goes like:
OnPlayerDeath > OnPlayerSpawn
... You have to know that.
Reply
#6

It's a "death bug" when you die on others screen, but not on your.
Reply
#7

How do i make so they spawn at hospital if they die?
Reply
#8

Steven make your own topic!
Reply
#9

Quote:
Originally Posted by $ЂЯĢ
It's a "death bug" when you die on others screen, but not on your.
yea but its not like that.
In my mode , when a player die. He is death. Because he cannot use commands or enter a vehicle. But he doesn't respawn. His health is 0. When the player jump of a small building he finaly respawn.
Sometimes he respawn sometimes not.
I had this before but I forget how i sloved it...
Reply
#10

Quote:
Originally Posted by Vinnie Venutti
Quote:
Originally Posted by $ЂЯĢ
It's a "death bug" when you die on others screen, but not on your.
yea but its not like that.
In my mode , when a player die. He is death. Because he cannot use commands or enter a vehicle. But he doesn't respawn. His health is 0. When the player jump of a small building he finaly respawn.
Sometimes he respawn sometimes not.
I had this before but I forget how i sloved it...
Thats the death bug ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)