08.04.2012, 14:34
pawn Code:
public OnGameModeInit()
{
AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); //Civilian - classid = 0
AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); //Mafia - classid = 1
return 1;
}
public OnPlayerRequestClass(playerid,classid)
{
//Create the TextDraw on OnPlayerConnect.
//---
if(classid == 0)
{
TextDrawSetString(TextDrawName, "Civilian");
}
else if(classid == 1)
{
TextDrawSetString(TextDrawName, "Mafia");
}
TextDrawShowForPlayer(playerid, TextDrawName);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
TextDrawHideForPlayer(playerid, TextDrawName);
return 1;
}