Player does not face the correct way?
#1

Well, I have just added random spawns on my server. They work fine, but there is a problem. When I do /save, I always do it facing the way I want (Facing the front). But, when I spawn I keep facing the wall, or I keep facing myself or I keep facing the wrong way. I've tried /save many times now, replacing each random spawn everytime. I cannot get it facing the way I want which is the front

Here is the random spawns array:

pawn Код:
new Float:RandomSpawns[][] = {

    {1412.8679, -1700.7404, 13.5395, 233.6144}, // Civillian spawn 1 - Pershing Square
    {1991.7661,-2053.8508,13.5477,90.9991}, // Civilian spawn 2 - Near airport
    {849.3010,-1381.5077,13.5563,271.4616}, // Civilian spawn 3 - Market
    {300.7701,-1619.4756,33.2390,220.8887}, // Civilian spawn 3 - Near Santa Maria Beach
    {1205.9773,-1746.0190,13.5928,60.3994}, // Civilian spawn 4 - Near Verona Beach
    {952.5780,-911.3897,45.7656,184.3968}, // Civilian spawn 5 - Near Rodeo ( Un tested )
    {463.8375,-1286.5236,15.4012,221.2020}, // Civilian spawn 6 - Near Rodeo
    {1753.5187,-1458.5074,13.5469,358.7425}, // Civilian spawn 7 - Near Jefferson ( Next to fire station in GTA SA )
    {2255.8955,-1333.6990,23.9817},// Civilian spawn 8 - Near Jefferson ( Big pointy building )
    {2704.6978,-1275.6461,57.9006,314.2629}, // Civilian spawn 9 - Near East Beach
    {2179.9175,-1661.5549,14.8936,220.4265} // Civilian spawn 10 - Near drug house Idlewood
};
And I tried to do this:

pawn Код:
public OnPlayerSpawn(playerid)
{
        if( gTeam[ playerid ] == TEAM_CIV )
    {
    new Random = random(sizeof(RandomSpawns));
        SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
        SetPlayerFacingAngle( playerid, 0 );
    }
    return 1;
}
Using SetPlayerFacing angle, but it doesn't work. Is there a way I can make the player face the way I want it. When I done /save, I made the skin face forward, but it doesn't change anything!

Is there a way to actually resolve it so I don't face the wrong way each time! Please help!

Thanks
Reply
#2

May I ask why you have added the code
Код:
SetPlayerFacingAngle(playerid,0);
?
Reply
#3

Well, because sometime told me to put it there. But, I tried it without that line, and it still doesn't work! Please help!!!
Reply
#4

Try using https://sampwiki.blast.hk/wiki/SetCameraBehindPlayer and remove SetPlayerFacingAngle(playerid,0);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)