08.05.2010, 02:05
pawn Код:
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" ");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" ");
print("----------------------------------\n");
}
#endif
new pcc = 0, pcc1;
new exercito = 0, exercito1;
new cv = 0, cv1;
public OnGameModeInit()
{
CreateObject(10244, 1327.8962402344, -885.32775878906, 41.676544189453, 0, 0, 89.325012207031);
pcc = CreateObject(980, 1337.7999267578, -916.87762451172, 37.477283477783, 0, 0, 338.16500854492);
CreateObject(987, 1311.0922851563, -911.75616455078, 37.506702423096, 0, 0, 354.04501342773);
CreateObject(987, 1303.7072753906, -910.50445556641, 38.493949890137, 0, 0, 356.0299987793);
CreateObject(987, 1322.7683105469, -912.34478759766, 36.781105041504, 0, 0, 346.10501098633);
CreateObject(3749, 1337.5662841797, -916.58062744141, 40.034767150879, 0, 0, 344.11999511719);
CreateObject(987, 1342.4384765625, -915.60119628906, 39.546875, 0, 1.9849853515625, 91.310028076172);
CreateObject(987, 1342.1588134766, -904.03662109375, 39.546875, 0, 1.9849853515625, 89.325012207031);
CreateObject(987, 1342.0859375, -892.30914306641, 39.546875, 0, 0, 89.325012207031);
CreateObject(987, 1342.142578125, -880.65533447266, 39.546875, 0, 0, 89.325012207031);
CreateObject(987, 1342.2293701172, -869.08374023438, 39.546875, 0, 0, 89.325012207031);
CreateObject(987, 1342.2944335938, -857.14404296875, 39.546875, 0, 0, 89.325012207031);
CreateObject(987, 1330.5766601563, -853.85559082031, 39.318313598633, 0, 0, 354.04501342773);
CreateObject(987, 1319.9417724609, -852.68695068359, 39.444171905518, 0, 0, 354.04501342773);
CreateObject(987, 1308.8748779297, -851.47210693359, 39.403690338135, 0, 0, 354.04501342773);
CreateObject(987, 1304.2670898438, -851.16064453125, 39.435134887695, 0, 0, 356.0299987793);
CreateObject(987, 1304.2458496094, -857.72692871094, 43.478626251221, 0, 0, 87.340026855469);
CreateObject(987, 1304.2028808594, -864.20111083984, 43.296852111816, 0, 0, 91.310028076172);
CreateObject(987, 1304.2403564453, -875.583984375, 42.882591247559, 0, 0, 91.310028076172);
CreateObject(987, 1304.0355224609, -875.68127441406, 43.067005157471, 0, 0, 268.68997192383);
CreateObject(987, 1303.953125, -887.60443115234, 42.8828125, 0, 0, 270.67498779297);
CreateObject(987, 1303.912109375, -898.90142822266, 42.8828125, 0, 0, 270.67498779297);
//
//EXERCITO//
CreateObject(10245, -1315.2131347656, 476.88919067383, 9.4714221954346, 0, 0, 133.7099609375);
CreateObject(10244, -1315.6271972656, 488.64776611328, 15.564765930176, 0, 0, 87.340026855469);
CreateObject(8263, -1446.7801513672, 481.47100830078, 8.3703460693359, 0, 0, 0);
CreateObject(8263, -1330.2761230469, 481.88638305664, 7.7600021362305, 0, 0, 0);
CreateObject(8263, -1279.6683349609, 440.6940612793, 9.2885265350342, 0, 0, 0);
CreateObject(3749, -1528.7169189453, 482.05187988281, 12.045914649963, 0, 0, 0);
exercito = CreateObject(980, -1529.0051269531, 481.90658569336, 8.9608917236328, 0, 0, 0);
CreateObject(8209, -1676.9127197266, 260.43148803711, 9.2885265350342, 0, 0, 0);
CreateObject(8209, -1577.6342773438, 260.55166625977, 9.2885265350342, 0, 0, 0);
CreateObject(8209, -1494.4876708984, 260.32791137695, 9.2885265350342, 0, 0, 0);
CreateObject(8209, -1446.4044189453, 309.65142822266, 9.2885265350342, 0, 0, 91.310028076172);
CreateObject(8210, -1234.8868408203, 463.37536621094, 9.2885265350342, 0, 0, 304.41998291016);
CreateObject(8210, -1260.1685791016, 481.22277832031, 9.2819423675537, 0, 0, 0);
//
//CV//
CreateObject(3749, 2185.6750488281, -1768.6574707031, 18.230968475342, 0, 0, 0);
cv = CreateObject(980, 2185.6848144531, -1766.7662353516, 15.147792816162, 0, 0, 0);
CreateObject(987, 2195.5771484375, -1815.0964355469, 15.140625, 0, 0, 91.310028076172);
CreateObject(987, 2195.279296875, -1803.0706787109, 15.140625, 0, 0, 89.325012207031);
CreateObject(987, 2195.5739746094, -1791.4207763672, 15.140625, 0, 0, 91.310028076172);
CreateObject(987, 2195.5412597656, -1779.5, 15.140625, 0, 0, 91.310028076172);
CreateObject(987, 2195.5747070313, -1824.1364746094, 15.140625, 0, 0, 89.325012207031);
CreateObject(987, 2195.578125, -1839.1604003906, 16.2421875, 0, 0, 89.325012207031);
CreateObject(987, 2195.5732421875, -1829.7889404297, 15.140625, 0, 0, 89.325012207031);
CreateObject(987, 2135.4499511719, -1831.8116455078, 15.140625, 0, 0, 348.08999633789);
CreateObject(987, 2146.8483886719, -1834.4506835938, 15.140625, 0, 0, 346.10501098633);
CreateObject(987, 2158.326171875, -1837.3688964844, 15.147471427917, 0, 0, 352.05999755859);
CreateObject(987, 2169.9135742188, -1839.0242919922, 15.140625, 0, 0, 0);
CreateObject(987, 2181.8583984375, -1838.982421875, 15.140625, 0, 0, 0);
CreateObject(974, 2193.0693359375, -1839.3455810547, 19.019927978516, 0, 0, 0);
CreateObject(987, 2128.7229003906, -1786.046875, 13.052604675293, 0, 0, 304.41998291016);
CreateObject(987, 2128.7473144531, -1786.0764160156, 18.052604675293, 0, 0, 304.41998291016);
CreateObject(987, 2135.2631835938, -1795.8773193359, 17.873613357544, 0, 0, 268.68997192383);
CreateObject(987, 2134.8754882813, -1807.8741455078, 17.873140335083, 0, 0, 270.67498779297);
CreateObject(987, 2134.8395996094, -1819.7290039063, 17.807161331177, 0, 0, 270.67498779297);
CreateObject(987, 2128.671875, -1767.7700195313, 17.566062927246, 0, 0, 272.65997314453);
CreateObject(987, 2129.171875, -1779.6907958984, 17.560245513916, 0, 0, 268.68997192383);
CreateObject(987, 2177.9084472656, -1766.1364746094, 17.547040939331, 0, 0, 178.65002441406);
CreateObject(987, 2166.1291503906, -1765.7626953125, 17.548667907715, 0, 0, 179.3649597168);
CreateObject(987, 2154.3525390625, -1765.5606689453, 17.551591873169, 0, 0, 179.3649597168);
CreateObject(987, 2142.7980957031, -1764.8529052734, 17.563905715942, 0, 0, 179.3649597168);
CreateObject(987, 2129.2504882813, -1767.6577148438, 17.711235046387, 0, 0, 17.864990234375);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/pcc", cmdtext, true)== 0)// define voce o nome . mesmo comando que abre fecha
{
if(pcc1 == 0)
{
MoveObject(pcc, 1337.7999267578, -916.87762451172, 33.477283477783, 5);// coloquei a abrir para baixo se quer abrir para cima em vez de 33 mete 41
SendClientMessage(playerid, 0xAA3333AA, "Porta aberta,");
pcc1 = 1;
}
else if(pcc1 == 1)
{
MoveObject(pcc, 1337.7999267578, -916.87762451172, 37.477283477783, 5);
SendClientMessage(playerid, 0xAA3333AA, "Porta Fechada");
pcc1 = 0;
}
return 1;
}
//==============================================================================
if (strcmp("/cv", cmdtext, true)== 0)
{
if(cv1 == 0)
{
MoveObject(cv, 2185.6848144531, -1766.7662353516, 11.147792816162, 5);// ultimo 5 й a velocidade
SendClientMessage(playerid, 0xAA3333AA, "Porta aberta,");
cv1 = 1;
}
else if(exercito1 == 1)
{
MoveObject(cv, 2185.6848144531, -1766.7662353516, 15.147792816162, 5);
SendClientMessage(playerid, 0xAA3333AA, "Porta Fechada");
cv1 = 0;
}
return 1;
}
//==============================================================================
if (strcmp("/exercito", cmdtext, true)== 0)
{
if(exercito1 == 0)
{
MoveObject(exercito, -1529.0051269531, 481.90658569336, 4.9608917236328, 5);
SendClientMessage(playerid, 0xAA3333AA, "Porta aberta,");
exercito1 = 1;
}
else if(exercito1 == 1)
{
MoveObject(exercito, -1529.0051269531, 481.90658569336, 8.9608917236328, 5);
SendClientMessage(playerid, 0xAA3333AA, "Porta Fechada");
exercito1 = 0;
}
return SendClientMessage(playerid,0xAA3333AA ,"SERVER: Comando invalido by DraKoN Gostoso.");
}