Spawn bug
#1

I have looked all over to see what could be causing this problem with no luck.

__________________________________________________ ____________________________________
PROBLEM:

I have random spawn points set for my team_civilian, The problem is, they some how always spawn in LV even though all my spawn points are set in LS. I have redone the spawn points, still same thing.


What could be causing this?
__________________________________________________ ____________________________________
THIS IS WHAT I THINK IS CAUSING IT:


Since I have AddPlayerSkin and the skins have cords, I think the code I have to set random spawns from the 7 spawn points I have is not working. So the players spawn in the cords from the AddPlayerClass.

AddPlayerClass(140,2634.0793,1072.6293,10.8203,88. 4012,0,0,0,0,0,0);// civil skin ]

Like this one.
__________________________________________________ ____________________________________

How can I fix this?


Heres the code:

pawn Код:
new Float:SpawnPoints[7][4] =
{
{1137.3713,-924.4383,43.3906,235.2106},
{1018.4409,-1553.5630,14.8657,274.1751},
{414.3812,-1758.3422,8.2016,178.8087},
{995.1847,-1299.4962,13.3899,178.7079},
{1660.2007,-1676.3376,21.4357,183.8303},
{1466.4388,-1283.8247,14.5766,161.3396},
{1660.7271,-1661.0430,22.5156,178.8169}
};
pawn Код:
if (gTeam[playerid] == TEAM_CIVIL){
    new rnd;
    SetPlayerFacingAngle(playerid, 88.6658);
    SetTimerEx("DialogTimeout", 60000, false, "i", playerid);
    rnd = random(sizeof (SpawnPoints));
    SetPlayerPos(playerid, SpawnPoints[rnd][0], SpawnPoints[rnd][1], SpawnPoints[rnd][2]);
    CanChooseSkill[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    SendClientMessage(playerid, 0x1E90FFAA, "Use /skill to pick a skill. If you don't pick one, you'll be given one automatically.");
    SendClientMessage(playerid, 0x1E90FFAA, "You have 60 seconds to pick a skill.");
Reply
#2

pawn Код:
if (gTeam[playerid] == TEAM_CIVIL){
    new rnd;
    new spawncount = 7;
    SetPlayerFacingAngle(playerid, 88.6658);
    SetTimerEx("DialogTimeout", 60000, false, "i", playerid);
    rnd = random(spawncount);
    SetPlayerPos(playerid, SpawnPoints[rnd][0], SpawnPoints[rnd][1], SpawnPoints[rnd][2]);
    CanChooseSkill[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    SendClientMessage(playerid, 0x1E90FFAA, "Use /skill to pick a skill. If you don't pick one, you'll be given one automatically.");
    SendClientMessage(playerid, 0x1E90FFAA, "You have 60 seconds to pick a skill.");
}
Maybe that will help.
Reply
#3

Same problem. I end up in LV for some reason
Reply
#4

I have something like this, and I'm having the same problem. I tried fixing it, I thought it worked, but then when i use /kill it happens again
Reply
#5

you have something putting them in LV then.
Reply
#6

I think you should check the skins not the team to be precise :P
and put it below OnPlayerSpawn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)