19.02.2012, 07:39
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#define red 0xE21F1FFF
#define white 0xFFFFFFAA
new gangwar[MAX_PLAYERS];
new gteam[MAX_PLAYERS];
#if defined FILTERSCRIPT
#else
main()
{
print("\n----------------------------------");
print(" ExtremeGangWar Gamemode by E_Mard ");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
SetGameModeText("ExTremeWar");
//***object***//
CreateObject(18753, 5321.29, 1057.34, -0.28, 0.00, 0.00, 0.00);
CreateObject(16668, 5291.64, 1027.08, 0.18, 0.00, 0.00, 0.00);
CreateObject(16668, 5350.92, 1087.33, 0.17, 0.00, 0.00, 180.41);
CreateObject(1411, 5383.02, 1004.68, 1.32, 0.00, 0.00, 268.79);
CreateObject(1411, 5382.95, 999.31, 1.32, 0.00, 0.00, 268.79);
CreateObject(3279, 5378.05, 998.26, 0.20, 0.00, 0.00, 184.08);
CreateObject(3279, 5264.69, 1002.07, 0.19, 0.00, 0.00, 0.00);
CreateObject(3279, 5378.06, 1113.29, 0.20, 0.00, 0.00, 176.11);
CreateObject(918, 5381.97, 1053.85, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5381.92, 1053.22, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5382.02, 1054.57, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5382.06, 1055.26, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5381.94, 1052.46, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5381.28, 1055.27, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5381.22, 1054.56, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5381.24, 1053.90, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5381.25, 1053.15, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5381.25, 1052.43, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5380.48, 1055.32, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5380.36, 1054.60, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5380.37, 1053.81, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5380.45, 1053.06, 0.65, 0.00, 0.00, 0.00);
CreateObject(918, 5380.46, 1052.35, 0.65, 0.00, 0.00, 0.00);
CreateObject(16096, 5379.56, 1058.89, 1.96, 0.00, 0.00, 87.49);
CreateObject(3277, 5268.29, 1028.09, 0.59, 0.00, 0.00, 0.00);
CreateObject(3277, 5268.29, 1028.09, 0.59, 0.00, 0.00, 0.00);
CreateObject(3277, 5269.51, 1052.81, 0.59, 0.00, 0.00, 0.00);
CreateObject(3277, 5270.08, 1077.76, 0.59, 0.00, 0.00, 0.00);
CreateObject(18848, 5268.50, 1028.37, 1.07, 0.00, 0.00, 82.27);
CreateObject(18848, 5269.71, 1052.62, 1.08, 0.00, 0.00, 89.01);
CreateObject(18848, 5270.39, 1077.67, 1.08, 0.00, 0.00, 85.24);
CreateObject(7527, 5324.30, 1009.97, 6.11, 0.00, 0.00, 359.62);
CreateObject(7527, 5324.35, 1034.77, 6.11, 0.00, 0.00, 0.00);
CreateObject(3268, 5353.93, 1104.77, 0.20, 0.00, 0.00, 89.96);
CreateObject(3268, 5317.92, 1104.64, 0.20, 0.00, 0.00, 89.96);
CreateObject(3880, 5386.06, 1008.42, -0.61, 0.00, 0.00, 0.00);
CreateObject(3880, 5256.51, 1106.63, -0.63, 0.00, 0.00, 0.00);
CreateObject(3880, 5256.51, 1116.76, -0.60, 0.00, 0.00, 0.00);
CreateObject(18850, 5311.12, 1067.24, -10.93, 0.00, 0.00, 0.00);
//***Vehicle***//
CreateVehicle(520, 5357.4155, 1066.8401, 1.9234, 0.0000, -1, -1, 100);
CreateVehicle(520, 5345.2988, 1066.9363, 1.9234, 0.0000, -1, -1, 100);
CreateVehicle(520, 5351.2271, 1078.0503, 1.9234, 0.0000, -1, -1, 100);
CreateVehicle(520, 5351.6470, 1056.5927, 1.9234, 0.0000, -1, -1, 100);
CreateVehicle(425, 5311.2881, 1067.0621, 3.0843, 90.7919, -1, -1, 100);
CreateVehicle(425, 5368.1885, 1040.6112, 3.0843, 90.7919, -1, -1, 100);
CreateVehicle(425, 5367.4463, 1019.0652, 3.0843, 90.7919, -1, -1, 100);
CreateVehicle(473, 5253.1016, 1104.5878, 0.2043, 0.0000, -1, -1, 100);
CreateVehicle(430, 5252.4160, 1114.1436, 0.5031, 0.0000, -1, -1, 100);
CreateVehicle(430, 5390.4966, 1007.7508, 0.2870, 0.0000, -1, -1, 100);
return 1;
}
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,703,DIALOG_STYLE_LIST,"ExtremeWar","{00A800}GroveStreet{FFFFFF}\n{800080}Ballas{FFFFFF}","Select", "Close");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
gteam[playerid] = 0;
gangwar[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if( gangwar[ playerid ] == 1 )
{
GivePlayerMoney(killerid, 2000);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerScore(killerid, GetPlayerScore(killerid) +500);
SendClientMessage(killerid, 0x80FF00C8, "You got $ 2000 and 500 point for killing an enemy.");
}
return 1;
}
public OnPlayerSpawn( playerid )
{
if (gteam[playerid] == 1) return GangWarGrove(playerid);
if (gteam[playerid] == 2) return GangWarBallas(playerid);
return 1;
}
stock GangWarGrove(playerid)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 1, 1);
GivePlayerWeapon(playerid, 5, 1);
SetPlayerTeam(playerid, 1);
SetPlayerPos(playerid, 5318.0767,1110.1471,1.2200);
SetPlayerFacingAngle(playerid, 108.3680);
SetPlayerSkin(playerid, minrand(105, 107));
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid,0x33AA33AA);
gangwar[playerid]=1;
gteam[playerid]=1;
TogglePlayerControllable(playerid,1);
return 1;
}
stock GangWarBallas(playerid)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 1, 1);
GivePlayerWeapon(playerid, 5, 1);
SetPlayerTeam(playerid, 2);
SetPlayerPos(playerid, 5318.0767,1110.1471,1.2200);
SetPlayerFacingAngle(playerid, 223.5255);
SetPlayerSkin(playerid, minrand(102, 104));
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid,0x9900FFAA);
gangwar[playerid]=1;
gteam[playerid]=2;
TogglePlayerControllable(playerid,1);
return 1;
}
stock minrand(min, max)
{
return random(max - min) + min;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 703)
{
if(response)
{
if(listitem == 0)
{
if (gteam[playerid] != 1)
{
SetPlayerVirtualWorld(playerid, 1);
SendClientMessage(playerid, 0x33AA33AA, "You joined to GROVE!");
}
}
if(listitem == 1)
{
if (gteam[playerid] != 2)
{
SetPlayerVirtualWorld(playerid, 1);
SendClientMessage(playerid, 0x9900FFAA, "You joined to BALLAS!");
}
}
}
}
return 1;
}