new Text:ServerName;
new Text:Team1;
new Text:Team2;
ServerName = TextDrawCreate(510.000000, 12.500000, "..::~r~Battlefield ~w~v1.3b::..");//485, 10 is the original thing
TextDrawBackgroundColor(ServerName, 255);
TextDrawFont(ServerName, 1);
TextDrawLetterSize(ServerName, 0.330000, 1.200000);
TextDrawColor(ServerName, -1);
TextDrawSetOutline(ServerName, 1);
TextDrawSetProportional(ServerName, 1);
TextDrawSetShadow(ServerName,1);
Team1 = TextDrawCreate(17 ,458 , "US Marine");
TextDrawFont(Team1 , 2);
TextDrawLetterSize(Team1 , 0.7, 4.8999999999999995);
TextDrawColor(Team1 , 0x5083cfFF);
TextDrawSetOutline(Team1 , false);
TextDrawSetProportional(Team1 , true);
TextDrawSetShadow(Team1 , 1);
Team2 = TextDrawCreate(22 ,457 , "Russian Spetsnaz");
TextDrawFont(Team2 , 2);
TextDrawLetterSize(Team2 , 0.7, 4.8999999999999995);
TextDrawColor(Team2 , 0xad2d2dFF);
TextDrawSetOutline(Team2 , false);
TextDrawSetProportional(Team2 , true);
TextDrawSetShadow(Team2 , 1);
if(GetPlayerTeam(playerid) == USA_Army)
{
SetPlayerColor(playerid, USA_Army_COLOUR);
SetPlayerRandomUSASpawn(playerid);
SetPlayerHealth(playerid, 99);
SetPlayerArmour(playerid, 50);
GivePlayerWeapon(playerid, 16, 5);
GivePlayerWeapon(playerid, 24, 247);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 500);
SetPlayerSkin(playerid, 287);
TextDrawShowForPlayer(playerid, Text:Team1); //Should show US Marine textdraw
TextDrawHideForPlayer(playerid, Text:Team2); //should hide Russian Spetsnaz textdraw
}
else if(GetPlayerTeam(playerid) == Russian_Spetsnaz)
{
SetPlayerColor(playerid, Russian_Spetsnaz_COLOUR);
SetPlayerSkin(playerid, 112);
SetPlayerHealth(playerid, 75);
SetPlayerArmour(playerid, 70);
GivePlayerWeapon(playerid, 16, 3);
GivePlayerWeapon(playerid, 24, 247);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 30, 500);
TextDrawShowForPlayer(playerid, Text:Team2); //Should show Russian Spetsnaz textdraw
TextDrawHideForPlayer(playerid, Text:Team1); //Hides US Marine textdraw
}
//GangzoneStuff
TextDrawShowForPlayer(playerid, Text:ServerName);
return 1;
}
TextDrawShowForPlayer(playerid, Text:Team1);
TextDrawShowForPlayer(playerid, Text:Team2);
TextDrawShowForPlayer(playerid, Team1);
TextDrawShowForPlayer(playerid, Team2);
Change
pawn Код:
pawn Код:
and TextDrawShowForPlayer(playerid, Text:ServerName); to TextDrawShowForPlayer(playerid, ServerName); |
seems like the if checks doesn't return true for some reason, are you sure you used SetPlayerTeam before OnPlayerSpawn gets called?
|
public OnPlayerRequestClass(playerid, classid) {
SetPlayerPos(playerid, 268.5824,1884.6180,-30.0938);
SetPlayerCameraPos(playerid, 268.4520,1886.7498,-29.5313);
SetPlayerCameraLookAt(playerid, 268.5824,1884.6180,-30.0938);
switch(classid)
{
case 0:
{
SetPlayerTeam(playerid, USA_Army);
SetPlayerSkin(playerid, 287);
GameTextForPlayer(playerid, "~b~USA Army", 20, 0);
}
case 1:
{
SetPlayerTeam(playerid, Russian_Spetsnaz);
SetPlayerSkin(playerid, 112);
GameTextForPlayer(playerid, "~r~Russian Spetsnaz", 20, 0);
}
}
return 1;
}