12.10.2016, 21:17
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
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(playerid, COLOR_RED, "You have to login in order to spawn.");
return 0;
}
new skinid = GetPlayerSkin(playerid);
if(skinid == 294)
{
if(!PlayerInfo[playerid][pHitman])
{
SendClientMessage(playerid, COLOR_RED, "You are not in the Hitman Agency.");
return 0;
}
else
{
SetSpawnInfo(playerid, TEAM_REBELS, skinid, -308.1565, 1538.6696, 75.5625, 131.0821, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
TeamPlayers[TEAM_REBELS]++;
SetPlayerColor(playerid, TEAM_COLOR_REBELS);
}
}
if(skinid == 285)
{
if(!PlayerInfo[playerid][pAlpha])
{
SendClientMessage(playerid, COLOR_RED, "You are not in the Alpha Team.");
return 0;
}
else
{
SetSpawnInfo(playerid, TEAM_MILITARY, skinid, 405.4637, 2439.7781, 16.5000, 0.8792, 0, 0, 0, 0, 0, 0);
TeamPlayers[TEAM_MILITARY]++;
SetPlayerColor(playerid, TEAM_COLOR_MILITARY);
SpawnPlayer(playerid);
}
}
if(skinid == 299 || skinid == 250 || skinid == 298)
{
if(TeamPlayers[TEAM_REBELS] > TeamPlayers[TEAM_MILITARY])
{
SendClientMessage(playerid, COLOR_RED, "The Rebels team is full, please choose the Military team.");
return 0;
}
else
{
new spawn = random(sizeof(TerrorSpawns));
SetSpawnInfo(playerid, TEAM_REBELS, skinid, TerrorSpawns[spawn][0], TerrorSpawns[spawn][1], TerrorSpawns[spawn][2], TerrorSpawns[spawn][3], 0, 0, 0, 0, 0, 0);
TeamPlayers[TEAM_REBELS]++;
SetPlayerColor(playerid, TEAM_COLOR_REBELS);
SpawnPlayer(playerid);
}
}
if(skinid == 287 || skinid == 179 || skinid == 191)
{
if(TeamPlayers[TEAM_MILITARY] > TeamPlayers[TEAM_REBELS])
{
SendClientMessage(playerid, COLOR_RED, "The Military team is full, please choose the Rebels team.");
return 0;
}
else
{
new spawn = random(sizeof(ArmySpawns));
SetSpawnInfo(playerid, TEAM_REBELS, skinid, ArmySpawns[spawn][0], ArmySpawns[spawn][1], ArmySpawns[spawn][2], ArmySpawns[spawn][3], 0, 0, 0, 0, 0, 0);
TeamPlayers[TEAM_MILITARY]++;
SetPlayerColor(playerid, TEAM_COLOR_MILITARY);
SpawnPlayer(playerid);
}
}
return 0;
}