23.08.2012, 16:56
Bom gente no meu game mode tdm, na versгo 0.1 por em quanto sу tem 3 times que sгo eles, Ricos, Cafetхes(Pimps), e Swats, mais eu faзo tudo certinho sem erros nenhum, e quando vou spwnar com swats ou pimps, cai sу no spawn dos ricos, poderiam me ajudar?
pawn Код:
// === Colors teams ===
#define COLOR_RICH 0xFFD1A8FF
#define COLOR_PIMP 0x9E1803FF
#define COLOR_SWAT 0x047015FF
// === Gangs ===
#define TEAM_RICHS 55
#define TEAM_PIMPS 66
#define TEAM_SWATS 77
// === -- ===
new Team[MAX_PLAYERS];
// ------------- Classes -----------------
AddPlayerClassEx(TEAM_RICHS,295,-2665.7739,937.6157,79.7101,180.0000,27,200,31,250,24,80); // Rich Spawn
AddPlayerClassEx(TEAM_PIMPS,296,-2654.5393,1387.2876,7.1529,270.0000,26,150,29,300,18,5); // Pimps Spawn
AddPlayerClassEx(TEAM_SWATS,285,-1635.9564,664.8169,7.1875,270.0000,25,300,31,250,29,200); // Swat Spawn
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0) //Richs
{
SetPlayerPos(playerid, -2664.8742, 935.6891, 79.7101);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 357.9516);
SetPlayerCameraPos(playerid, -2668.3742, 939.6891, 81.2101);
SetPlayerCameraLookAt(playerid, -2664.8742, 935.6891, 79.7101);
//-------------------------------------------
GameTextForPlayer(playerid,"~w~Ricos",1000,1);
}
if(classid == 1) //Pimps
{
SetPlayerPos(playerid, -2654.5393, 1387.2875, 7.1529);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 270.0000);
SetPlayerCameraPos(playerid, -2658.0393, 1391.2875, 8.6529);
SetPlayerCameraLookAt(playerid, -2654.5393, 1387.2875, 7.1529);
//-------------------------------------------
GameTextForPlayer(playerid,"~r~Cafetoes",1000,1);
}
if(classid == 2) //Swats
{
SetPlayerPos(playerid, -1635.8666, 664.9107, 7.1875);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 177.4210);
SetPlayerCameraPos(playerid, -1639.3666, 668.9107, 8.6875);
SetPlayerCameraLookAt(playerid, -1635.8666, 664.9107, 7.1875);
//-------------------------------------------
GameTextForPlayer(playerid,"~g~Swats",1000,1);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
switch(Team[playerid])
{
case 0:
{
SetPlayerPos(playerid,-2665.7739,937.6157,79.7101);
GivePlayerWeapon(playerid,16,5);
SetPlayerColor(playerid,COLOR_RICH);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerTeam(playerid,TEAM_RICHS);
}
case 1:
{
SetPlayerPos(playerid,-2654.5393,1387.2876,7.1529);
GivePlayerWeapon(playerid,14,1);
SetPlayerColor(playerid,COLOR_PIMP);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerTeam(playerid,TEAM_PIMPS);
}
case 2:
{
SetPlayerPos(playerid,-1635.9564,664.8169,7.1875);
GivePlayerWeapon(playerid,16,5);
SetPlayerColor(playerid,COLOR_SWAT);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerTeam(playerid,TEAM_SWATS);
}
}
return 1;
}