Hospital Death Respawn 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)
+--- Thread: Hospital Death Respawn Problem (
/showthread.php?tid=404126)
Hospital Death Respawn Problem -
StuartD - 01.01.2013
Well, Basically I am trying to make it so that when someone dies they go to hospital, That worked fine!
but then when the time is up after the hospital they are meant to be outside... However the spawn at their joining position.
I then tried an idea of using this;
pawn Код:
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pHospital] = 0) // Not dead in hospital
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]);
SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos][3]);
return 1;
}
else if(PlayerInfo[playerid][pHospital] = 1) //Is dead in hospital
{
SetPlayerPos(playerid, -316.0580, 1052.8657, 20.3318);
return 1;
}
SetPlayerColor(playerid, COLOR_GREY);
return 1;
}
However this returns the following errors;
Код:
(1032) : warning 211: possibly unintended assignment
(1039) : warning 211: possibly unintended assignment
Line 1032;
pawn Код:
if(PlayerInfo[playerid][pHospital] = 0) // Not dead in hospital
Line 1039;
pawn Код:
else if(PlayerInfo[playerid][pHospital] = 1) //Is dead in hospital
Any Ideas?
Re: Hospital Death Respawn Problem -
ThePhenix - 01.01.2013
PHP код:
PlayerInfo[playerid][pHospital] == 1
You forgot an extra =.
Re: Hospital Death Respawn Problem -
StuartD - 01.01.2013
Thanks. Ill try it