06.12.2014, 11:29
Hello guys!
I made a script ,that spawns player in the bed if he was dead and etc.
And everything is working fine ,but it doesnt send me to bed and it doesnt activate the animation.
Take a look:
I made a script ,that spawns player in the bed if he was dead and etc.
And everything is working fine ,but it doesnt send me to bed and it doesnt activate the animation.
Take a look:
pawn Код:
stock PlaceToHospitalBed(playerid)
{
new bool: full = true;
for (new i; i != sizeof (LigoninesLovos); ++i)
{
if (LigoninesLovos[i][LL_taken] == false)
{
full = false;
}
}
if (full)
{
SetPlayerPos(playerid,-202.3200,-1761.7898,675.7687);
SendClientMessage(playerid,CHATCOLOR_RED,"Palatose nera vietu todel buvai greit pagydytas ant operacinio stalo.");
}
else
{
new Random, count;
Random = random(sizeof (LigoninesLovos));
if (LigoninesLovos[Random][LL_taken] == false)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid, LigoninesLovos[Random][LL_pos][0], LigoninesLovos[Random][LL_pos][1], LigoninesLovos[Random][LL_pos][2]);
SetPlayerFacingAngle(playerid, LigoninesLovos[Random][LL_pos][3]);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.1, 0, 1, 1, 1, 0);
TogglePlayerSpectating(playerid, 1);
TogglePlayerControllable(playerid, 0);
InterpolateCameraPos(playerid, -200.499435, -1758.981567, 677.898132, -200.831359, -1772.208251, 677.901367, 20000);
InterpolateCameraLookAt(playerid, -198.193222, -1763.108764, 676.270874, -198.342041, -1768.232177, 676.171081, 20000);
SendClientMessage(playerid, CHATCOLOR_RED, "Siek tiek turesi palaukti kol pagysi!");
LigoninesLovos[Random][LL_taken] = true;
count++;
}
if(count == sizeof(LigoninesLovos))
{
full = true;
}
}
return 1;
}