public OnGameModeInit()
{
ShowPlayerMarkers(1);
AddPlayerClassEx(1, 270, 1568.7001, -1692.1791, 5.8906, 184.3483, 24, 1000, 25, 1000, 31, 1000);// Gangsters
AddPlayerClassEx(2, 5, 936.0454, -1386.3639, 13.3991, 184.5401, 24, 1000, 25, 1000, 31, 1000); // Fatty's
AddPlayerClassEx(3, 281, 1568.7001, -1692.1791, 5.8906, 184.3483, 24, 1000, 25, 1000, 31, 1000); // Police
AddPlayerClassEx(4, 230, 1658.0037, -1836.8112, 13.5476, 79.0180, 24, 1000, 25, 1000, 31, 1000); // Homeless
AddPlayerClassEx(5, 178, 2421.6531, -1220.6165, 25.4725, 193.4817, 24, 1000, 25, 1000, 31, 1000); // Stripper
AddPlayerClassEx(6, 274, 2034.1166, -1414.9341, 16.9922, 133.6346, 24, 1000, 25, 1000, 31, 1000); // Medics
AddPlayerClassEx(7, 68, 2232.1021, -1333.1947, 23.9815, 93.0692, 24, 1000, 25, 1000, 31, 1000); // Priest
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
SendClientMessage(playerid, Colour_White, "Gangsters");
}
else if(classid == 1)
{
SendClientMessage(playerid, Colour_White, "Fatty's");
}
else if(classid == 2)
{
SendClientMessage(playerid, Colour_White, "The Po-Po");
}
else if(classid == 3)
{
SendClientMessage(playerid, Colour_White, "Homeless");
}
else if(classid == 4)
{
SendClientMessage(playerid, Colour_White, "Strippers");
}
else if(classid == 5)
{
SendClientMessage(playerid, Colour_White, "Medics");
}
else if(classid == 6)
{
SendClientMessage(playerid, Colour_White, "Priest");
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
SpawnPlayer(playerid);
SetPlayerInterior(playerid, 0);
return 1;
}
public OnPlayerSpawn(playerid)
{
switch(GetPlayerTeam(playerid))
{
case 1:
{
SetPlayerColor(playerid, 0x1B9632AA); // Gangsters
}
case 2:
{
SetPlayerColor(playerid, 0xF58916AA); // Fatty's
}
case 3:
{
SetPlayerColor(playerid, 0x0B34BAAA); // The Po-Po
}
case 4:
{
SetPlayerColor(playerid, 0xEAF516AA); // Homeless
}
case 5:
{
SetPlayerColor(playerid, 0xF516D7AA); // Strippers
}
case 6:
{
SetPlayerColor(playerid, 0xF20505AA); // Medics
}
case 7:
{
SetPlayerColor(playerid, 0x969696AA); // Priest
}
case 0:
{
SetPlayerInterior(playerid, 3);
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
SetSpawnInfo(playerid, 0, 0, 513.882507, -11.269994, 1001.565307, 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
}
ForceClassSelection(playerid);
You added this OnPlayerSpawn:
pawn Код:
By this code, when player is spawning, you're forcing him to class selection, so to remove that "Returning to class selection" message you need to remove this message. |
Public OnPlayerSpawn
SetPlayerPos(playerid, float:x , float:y, float:z);
In
pawn Код:
pawn Код:
|
Don't add that OnPlayerSpawn, you can make a command like /st to switch team(ForceClassSelection(playerid))
If you mean you want to force them when they connect, you must put this OnPlayerRequestClass.. |
Yea as you can see I'm a nab scripter that's why I got negative reputation, sorry about that.
I'm trying to help you out, but you ain't helping us out with your info. |