pawn Код:
public OnPlayerSpawn(playerid)
{
ResetPlayerWeapons(playerid);
if(IsSniper[playerid]==1)
{
GivePlayerWeapon(playerid,34,200);
GivePlayerWeapon(playerid,25,200);
GivePlayerWeapon(playerid,23,200);
GivePlayerWeapon(playerid,44,200);
IsClassed[playerid] = 20;
}
else if(IsAssault[playerid]==1)
{
GivePlayerWeapon(playerid,31,500);
GivePlayerWeapon(playerid,27,200);
GivePlayerWeapon(playerid,29,400);
IsClassed[playerid] = 20;
}
else if(IsRocket[playerid]==1)
{
GivePlayerWeapon(playerid,36,100);
GivePlayerWeapon(playerid,39,5);
GivePlayerWeapon(playerid,40,1);
GivePlayerWeapon(playerid,35,100);
GivePlayerWeapon(playerid,29,400);
IsClassed[playerid] = 20;
}
else if(IsTrooper[playerid]==1)
{
GivePlayerWeapon(playerid,22,200);
GivePlayerWeapon(playerid,33,200);
GivePlayerWeapon(playerid,29,400);
GivePlayerWeapon(playerid,42,50);
IsClassed[playerid] = 20;
}
else if(IsMedic[playerid]==1)
{
GivePlayerWeapon(playerid,23,200);
GivePlayerWeapon(playerid,33,200);
GivePlayerWeapon(playerid,4,1);
GivePlayerWeapon(playerid,44,100);
IsClassed[playerid] = 20;
}
else if(IsScout[playerid]==1)
{
GivePlayerWeapon(playerid,26,200);
GivePlayerWeapon(playerid,32,200);
GivePlayerWeapon(playerid,4,1);
GivePlayerWeapon(playerid,18,2);
IsClassed[playerid] = 20;
}
else if(IsEngineer[playerid]==1)
{
GivePlayerWeapon(playerid,25,200);
GivePlayerWeapon(playerid,22,200);
GivePlayerWeapon(playerid,35,2);
GivePlayerWeapon(playerid,16,2);
GivePlayerWeapon(playerid,31,200);
IsClassed[playerid] = 20;
}
else if(IsClassed[playerid] == 20)
{
ShowPlayerDialog(playerid,699,DIALOG_STYLE_LIST,"Choose A Class:","Sniper Class\nAssualt Class\nRocket Class \nTrooper Class \nMedic Class \nScout Class\nEngineer Class","Accept","Exit");
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
IsDisarmed[playerid] = 0;
if(GetPlayerTeam(killerid) == 1)
{
RussiaScore++; //Sets team1score
new newtext[41];
format(newtext, sizeof(newtext), "Russias Score: %d", RussiaScore);
TextDrawSetString(Text:Textdraw0, newtext);
}
if(GetPlayerTeam(killerid) == 2)
{
USAScore++; //Sets team2score
new newtext[41];
format(newtext, sizeof(newtext), "USA Score: %d", USAScore);
TextDrawSetString(Text:Textdraw1, newtext);
}
if(RussiaScore == 50 || USAScore == 50)
{
SendRconCommand("changemode w1");
}
ShowHideTD(Text:Textdraw0);
ShowHideTD(Text:Textdraw1);
new string[18];
format(string, sizeof(string),"Killed: %s", GetName(playerid));
GameTextForPlayer(playerid, string, 3000, 5);
GivePlayerMoney(killerid, 1000);
if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
new stringA[18];
format(stringA, sizeof(stringA),"Killed by: %s", GetName(killerid));
GameTextForPlayer(playerid, stringA, 3000, 5);
GivePlayerMoney(playerid, -500);
PlayerInfo[killerid][pKills] += 1;
PlayerInfo[playerid][pDeaths] += 1;
IsClassed[playerid] = 20;
return 1;
}