Help with spawning
#1

Hey i have a problem, i want players to spawn at hospital when the die i have tryed many ways off other help topics but none of them have worked. the problem i get is when you die, it will spawn you at the New Player spawn. heres my code
pawn Код:
new bool:NewPlayer[MAX_PLAYERS];
new bool:Death[MAX_PLAYERS];
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(NewPlayer[playerid] == true)
    {
        new rand = random(sizeof(SpawnSkins));
        SetPlayerPos(playerid, 836.8863,-2064.6953,12.8672);// New Player Spawn
        SetPlayerFacingAngle(playerid, 1.3629);
        SetPlayerSkin(playerid, SpawnSkins[rand][0]);
        NewPlayer[playerid] = false;
    }
    if(Death[playerid] == true)
    {
        SetPlayerPos(playerid, 2038.1417,-1411.3397,17.1641);//hospital spawn
        SetPlayerFacingAngle(playerid, 130.9140);
        Death[playerid] = false;
    }
    return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    GameTextForPlayer(playerid, "~r~Wasted", 5000, 2);
    SendDeathMessage(killerid, playerid, reason);
    pInfo[playerid][Deaths] += 1;
    pInfo[killerid][Kills] += 1;
    pInfo[killerid][Scores] += 1;
    Death[playerid] = true;
    return 1;
}
i will rep the person who can solve my problem.

Thanks in advance
Reply


Messages In This Thread
Help with spawning - by Jakwob - 16.12.2014, 11:01
Re: Help with spawning - by Ryz - 16.12.2014, 11:11
Re: Help with spawning - by Sawalha - 16.12.2014, 11:12
Re: Help with spawning - by Jakwob - 16.12.2014, 11:19
Re: Help with spawning - by Ryz - 16.12.2014, 11:24
Re: Help with spawning - by Jakwob - 16.12.2014, 11:33
AW: Help with spawning - by Flori - 16.12.2014, 11:41
AW: Help with spawning - by Flori - 16.12.2014, 11:45
Re: Help with spawning - by Arastair - 16.12.2014, 11:54
Re: AW: Help with spawning - by Arastair - 16.12.2014, 12:14

Forum Jump:


Users browsing this thread: 3 Guest(s)