Spawn at nearest hospital script not working.
#4

Quote:
Originally Posted by Miado_Hulk
Посмотреть сообщение
pawn Код:
stock SpawnToHospital(playerid)
{
    dead[playerid] = 0;
    hos[0] =GetPlayerDistanceFromPoint(playerid, 2034.1670,-1406.0623,17.2181);
    hos[1] =GetPlayerDistanceFromPoint(playerid, 1177.3391,-1324.2300,14.0658);
    //hos[2] = GetPlayerDistanceFromPoint(playerid, 1177.3391,-1324.2300,14.0658);
    if (hos[0]<= hos[1])
    {
        SetPlayerPos(playerid, 2034.1670,-1406.0623,17.2181);
        SetPlayerFacingAngle(playerid, 125);
        SetCameraBehindPlayer(playerid);
        print("hos 0 is closer");
    }
    else
    {
        SetPlayerPos(playerid, 1177.3391,-1324.2300,14.0658);
        SetPlayerFacingAngle(playerid, 90);
        SetCameraBehindPlayer(playerid);
        print("hos 1 is closer");
    }
    return 1;
}
Nope, but thanks for trying.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)