pawn Код:
//==============================================================================
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,COLOR_GREEN,"Welcome to ********");
return 1;
}
//==============================================================================
public OnGameModeInit()
{
SetGameModeText("Cops and Criminals");
AddPlayerClass(2, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(265, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(287, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
//==============================================================================
public OnPlayerRequestClass(playerid, classid)
{
Class[playerid] = classid;
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,944.99,-41.64,1001.77);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid,944.69,-47.54,1001.12);
SetPlayerCameraLookAt(playerid,944.99,-41.64,1001.77);
if(classid == 0)
{
SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid,"~w~CIVILIAN",1000,4);
}
if(classid == 1)
{
SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid,"~b~COP",1000,4);
}
if(classid == 2)
{
SetPlayerTeamFromClass(playerid, classid);
GameTextForPlayer(playerid,"~g~ARMY",1000,4);
}
return 1;
}
//==============================================================================
public OnPlayerSpawn(playerid)
{
if(Class[playerid] == 0)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2004.93,1544.25,13.59);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerToTeamColour(playerid);
SetPlayerTeamFromClass(playerid, classid);
}
//Will add spawn points for cops and Army later.
return 1;
}
//==============================================================================
public OnPlayerDeath(playerid)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2004.93,1544.25,13.59);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerToTeamColour(playerid);
GivePlayerMoney(playerid, -100);
return 1;
}