OnPlayerRequestSpawn bug
#7

Quote:
Originally Posted by Pearson
Посмотреть сообщение
Use SetSpawnInfo Bro.
I use it under OnPlayerRequsetSpawn, that is OnPlayerRequsetClass
I can't find any logical reason for not having the GameText and positions set
That's the public
PHP код:
public OnPlayerRequestSpawn(playerid)
{
    if(!
PlayerInfo[playerid][pLoggedIn])
    {
        
SendClientMessage(playeridCOLOR_RED"You have to login in order to spawn.");
        return 
0;
    }
    new 
skinid GetPlayerSkin(playerid);
    if(
skinid == 294)
    {
        if(!
PlayerInfo[playerid][pHitman])
        {
            
SendClientMessage(playeridCOLOR_RED"You are not in the Hitman Agency.");
            return 
0;
        }
        else
        {
               
SetSpawnInfo(playeridTEAM_REBELSskinid, -308.15651538.669675.5625131.0821000000);
            
SpawnPlayer(playerid);
            
TeamPlayers[TEAM_REBELS]++;
            
SetPlayerColor(playeridTEAM_COLOR_REBELS);
        }
    }
    if(
skinid == 285)
    {
        if(!
PlayerInfo[playerid][pAlpha])
        {
            
SendClientMessage(playeridCOLOR_RED"You are not in the Alpha Team.");
            return 
0;
        }
        else
        {
               
SetSpawnInfo(playeridTEAM_MILITARYskinid405.46372439.778116.50000.8792000000);
               
TeamPlayers[TEAM_MILITARY]++;
               
SetPlayerColor(playeridTEAM_COLOR_MILITARY);
            
SpawnPlayer(playerid);
        }
    }
    if(
skinid == 299 || skinid == 250 || skinid == 298)
    {
        if(
TeamPlayers[TEAM_REBELS] > TeamPlayers[TEAM_MILITARY])
        {
            
SendClientMessage(playeridCOLOR_RED"The Rebels team is full, please choose the Military team.");
            return 
0;
        }
        else
        {
            new 
spawn random(sizeof(TerrorSpawns));
            
SetSpawnInfo(playeridTEAM_REBELSskinidTerrorSpawns[spawn][0], TerrorSpawns[spawn][1], TerrorSpawns[spawn][2], TerrorSpawns[spawn][3], 000000);
            
TeamPlayers[TEAM_REBELS]++;
            
SetPlayerColor(playeridTEAM_COLOR_REBELS);
            
SpawnPlayer(playerid);
        }
    }
    if(
skinid == 287 || skinid == 179 || skinid == 191)
    {
        if(
TeamPlayers[TEAM_MILITARY] > TeamPlayers[TEAM_REBELS])
        {
            
SendClientMessage(playeridCOLOR_RED"The Military team is full, please choose the Rebels team.");
            return 
0;
        }
        else
        {
              new 
spawn random(sizeof(ArmySpawns));
            
SetSpawnInfo(playeridTEAM_REBELSskinidArmySpawns[spawn][0], ArmySpawns[spawn][1], ArmySpawns[spawn][2], ArmySpawns[spawn][3], 000000);
            
TeamPlayers[TEAM_MILITARY]++;
            
SetPlayerColor(playeridTEAM_COLOR_MILITARY);
            
SpawnPlayer(playerid);
        }
    }
    return 
0;

Reply


Messages In This Thread
OnPlayerRequestSpawn bug - by NeXoR - 11.10.2016, 13:51
Re: OnPlayerRequestSpawn bug - by NeXoR - 12.10.2016, 16:46
Re: OnPlayerRequestSpawn bug - by Quinncell - 12.10.2016, 17:06
Re: OnPlayerRequestSpawn bug - by NeXoR - 12.10.2016, 18:14
Re: OnPlayerRequestSpawn bug - by NeXoR - 12.10.2016, 19:52
Re: OnPlayerRequestSpawn bug - by Pearson - 12.10.2016, 20:57
Re: OnPlayerRequestClass bug - by NeXoR - 12.10.2016, 21:17
Re: OnPlayerRequestSpawn bug - by NeXoR - 12.10.2016, 22:20
Re: OnPlayerRequestSpawn bug - by NeXoR - 12.10.2016, 22:37
Re: OnPlayerRequestSpawn bug - by Pearson - 12.10.2016, 22:41

Forum Jump:


Users browsing this thread: 4 Guest(s)