Infection problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Infection problem (
/showthread.php?tid=128924)
Infection problem -
Julian2574 - 20.02.2010
OK guys , I've got a problem with my infection system.
The problem is: When a zombie infect a person he loose health ( that's good ) BUT when he receive 0HP he dies of course but doesn't re spawn why? I don't know . If I remove my re spawn system after infection they still spawn with the infection and dies over and over.
Here's my re spawn system , It's located in Onplayerspawn and onplayerdeathreason ( Security reasons )
Код:
else if(Infected[playerid] == 1)//Infected ID
{
gTeam[playerid] = 5; //Makes your status to zombie.
PlayerInfo[playerid][pTeam] = 5;
SetPlayerColor(playerid,TEAM_ZOMBIE_COLOR);
SetPlayerWeapons(playerid);
ShowPlayerMarkers(1);
Infected[playerid] = 0;
SetPlayerRandomSpawn(playerid);
format(string, sizeof(string), "%s got infected and died, Another zombie!", name);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
Any ideas?
Re: Infection problem -
Paulo_Raphael - 31.05.2010
Put first ur ALL gamemode here to analyse, because the problem can be in other place
Re: Infection problem -
Flashy - 31.05.2010
Quote:
Originally Posted by Paulo_Raphael
Put first ur ALL gamemode here to analyse, because the problem can be in other place
|
Donґt do what he says. He is a nub who want youur gamemodes.
There is no need to show all gamemodes.
Re: Infection problem -
cessil - 31.05.2010
well I've had problems when players are in markers they don't die and appear dead to others, so could be the markers thing.
To force them to spawn use OnPlayerSpawn(playerid); in OnPlayerDeath and see if that works as a temporary fix or test.
Re: Infection problem -
martyz-lithuania - 31.05.2010
Try to use
Код:
SetPlayerHealth(playerid,100);