Bug after died inside Vehicle
#1

I noticed that everytime I'm on a vehicle then I died inside any vehicle. It spawn me nowhere randomly, I mean sometimes I fall somewhere in the sky, sometimes in Grove Street (Near CJ house)

Well, When Im onfoot then I get killed/died it spawn me perfectly in the right place where I set it to spawn.

This is the deathmatch map where it only occurs.

pawn Код:
]new Float:RandomSpawnWarDM[][] =
{
    // Positions, (X, Y, Z and Facing Angle)
    {173.8663,1849.1656,17.6737,314.6318},
    {141.7191,1926.0688,19.1778,232.8511},
    {253.0674,1909.5975,20.5629,114.0967},
    {274.8315,1817.4355,17.6406,52.3694},
    {213.5863,1861.2684,13.1406,0.0656}
};
pawn Код:
CMD:war(playerid, params[])
{
    SetPlayerHealth(playerid, 100);
    SetPlayerVirtualWorld(playerid, 18);
    SetPlayerInterior(playerid, 0);
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 42, 100000);
    DestroyVehicle(GetPlayerVehicleID(playerid));
    new Random = random(sizeof(RandomSpawnWarDM));
    SetPlayerPos(playerid, RandomSpawnWarDM[Random][0], RandomSpawnWarDM[Random][1], RandomSpawnWarDM[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnWarDM[Random][3]);
    SetPVarInt(playerid,"WarDM",true);
    return 1;
}
Under OnPlayerSpawn
pawn Код:
new Random = random(sizeof(RandomSpawnWarDM));
    SetPlayerPos(playerid, RandomSpawnWarDM[Random][0], RandomSpawnWarDM[Random][1], RandomSpawnWarDM[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawnWarDM[Random][3]);
    SetPlayerHealth(playerid, 100);
    SetPlayerVirtualWorld(playerid, 18);
    SetPlayerInterior(playerid, 0);
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 42, 100000);
    SetPVarInt(playerid, "CMDDisabled", 1);
   //////////Set Random Spawns NOT IN DM///////
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random]
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)