public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid,playerid,reason);
PlayerInfo[playerid][pDeaths] ++;
PlayerInfo[killerid][pKills] ++;
RemovePlayerAttachedObject(playerid, 0);
dini_IntSet(file, \"pTeam\", GetPlayerTeam(playerid));
return 1;
}
public OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file),\"Users/%s.ini\", name);
SetPlayerTeam(playerid, dini_Int(file, \"pTeam\"));
PlayerInfo[playerid][pPRank] = dini_Int(file, \"pPRank\");
if(GetPlayerTeam(playerid) == TEAM_ZSARU)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1579.4012,-1634.6587,13.5625);
SetPlayerFacingAngle(playerid, 85.8882);
if(PlayerInfo[playerid][pPRank] == 1)
{
SetPlayerSkin(playerid, 284);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 25, 500);
SetPlayerArmour(playerid, 100);
}
else if(PlayerInfo[playerid][pPRank] == 2)
{
SetPlayerSkin(playerid, 280);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 25, 500);
SetPlayerArmour(playerid, 100);
}
else if(PlayerInfo[playerid][pPRank] == 3)
{
SetPlayerSkin(playerid, 280);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 23, 500);
GivePlayerWeapon(playerid, 27, 500);
SetPlayerArmour(playerid, 100);
}
}
else if(GetPlayerTeam(playerid) == TEAM_1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1480.8455,-1764.3717,18.7958);
SetPlayerFacingAngle(playerid, 0.1543);
}
else if(GetPlayerTeam(playerid) == TEAM_2)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2104.5352,-1809.2329,13.5547);
SetPlayerFacingAngle(playerid, 94.0175);
}
else if(GetPlayerTeam(playerid) == TEAM_3)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1804.0671,-1937.7013,13.5469);
SetPlayerFacingAngle(playerid, 89.2636);
}
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw0);
return 1;
}