OnPlayerDeath
Код:
if(sw[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "You got a bonus for killing a player in sw");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +150");
GivePlayerMoney(killerid, 150);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(m4w[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "You got a bonus for killing a player in m4w");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +150");
GivePlayerMoney(killerid, 150);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(mgw[playerid] == 1)
{
SendClientMessage(killerid, COLOR_GREEN, "You got a bonus for killing a player in mgw");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +200");
GivePlayerMoney(killerid, 200);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
else
if(m4w[playerid] == 0 || sw[playerid] == 0 || mgw[playerid] == 0)
{
SendClientMessage(killerid, COLOR_GREEN, "You just killed a player");
SendClientMessage(killerid, COLOR_GREEN, "( $ ) +100");
GivePlayerMoney(killerid, 100);
SendClientMessage(playerid, COLOR_NORMALRED, "( $ ) -10");
GivePlayerMoney(playerid, -10);
}
OnPlayerSpawn
Код:
{
SetPlayerArmour(playerid, 100);
if(sw[playerid] == 1)
{
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, -19.0286,-175.3378,1003.5469);
SetPlayerFacingAngle(playerid, 330.8037);
GivePlayerWeapon(playerid, 25, 1000);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 50);
}
else
if(m4w[playerid] == 1)
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 2256.4790,1611.7258,1006.1797);
SetPlayerFacingAngle(playerid, 273.1208);
GivePlayerWeapon(playerid, 31, 1000);
SetPlayerHealth(playerid, 100);
}
else
if(mgw[playerid] == 1)
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 2176.6042,1613.3317,999.9766);
SetPlayerFacingAngle(playerid, 269.1238);
GivePlayerWeapon(playerid, 38, 111110); // minigun
SetPlayerHealth(playerid, 200);
}
else
if(m4w[playerid] == 0 || sw[playerid] == 0 || mgw[playerid] == 0)
{
(m4w[playerid] = 0);
(mgw[playerid] = 0);
(sw[playerid] = 0);
}
return 1;