Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**************************************************************************/
- // Ammo Nation
- /*************************************************************************/
- /**************************************************************************/
- // Version 2.0 | Build 2
- /*************************************************************************/
- /**
- * Copyright (c) 2015-2016 San Andreas Playground
- *
- * This program is free software: you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with this program.
- * If not, see <http://www.gnu.org/licenses/>.
- */
- /*AUTHOR ********************
- @Yaa - SA-MP Lead Scripter
- ***************************/
- /*CMDS ********************
- /wshop [ Enter / Exit ]
- /mycar
- ***************************/
- // Includes ========================================================================================
- #include <a_samp>
- #include <zcmd>
- #include <YSI\y_ini>
- #include <streamer>
- // Defines ========================================================================================
- #define SERVERNAME "San Andreas Playground"
- #define R "{F81414}"
- #define O "{FFAF00}"
- #define YE "{FFFF00}"
- #define GRI "{C0C0C0}"
- #define PATH "/Ammo/Cars/%s.ini"
- #define COLOR_GREEN 0x33AA33AA
- #if !defined isnull
- #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
- #endif
- // Variables =======================================================================================
- new SpawnArmour[MAX_PLAYERS];
- new SpawnProtection[MAX_PLAYERS];
- new Ammo[MAX_PLAYERS];
- new AmmoPick[2];
- new SPDuration[MAX_PLAYERS];
- new Cars[6];
- new Text3D:vehicle3Dtext[MAX_VEHICLES];
- new MyCar[MAX_PLAYERS];
- new SMyCar[MAX_PLAYERS];
- new Gate;
- new WSCP[2];
- new Material[8];
- new PMaterial;
- // Forwards ========================================================================================
- forward AntiSpawnkill(playerid);
- forward LoadUser_Car(playerid,name[],value[]);
- forward GateTimer();
- // Script =========================================================================================
- public OnFilterScriptInit()
- {
- print("****************************************");
- print("----------------------------------------");
- print(" LV AMMO NATION BY Yaa ");
- print("----------------------------------------");
- print("****************************************");
- print("----------------------------------------");
- print(" VERSION : 2.0 ");
- print("----------------------------------------");
- print("****************************************");
- print("----------------------------------------");
- print(" LOADED ! ");
- print("----------------------------------------");
- print("****************************************");
- WSCP[0] = CreateDynamicCP(2069.5486, 1555.4246, 10.6719, 3.0, -1, -1,-1, 100.0);
- WSCP[1] = CreateDynamicCP(2083.6482, 1582.1544, 11.4341, 1.0, -1, -1,-1, 100.0);
- AmmoPick[0] = CreatePickup(1254, 2, 2111.1143, 1564.0620, 11.4344, -1);
- AmmoPick[1] = CreatePickup(1318, 2, 2109.6794, 1553.6306, 11.4344, -1);
- Create3DTextLabel(""R""SERVERNAME"\n "O"Ammo Nation v1.0 \n"YE"Use /wshop ", 0xF67E0FF, 2085.0610, 1577.1023, 11.4341, 50.0, 0, 0);
- Create3DTextLabel(""R"Weapons", 0xF67E0FF, 2111.1143, 1564.0620, 11.4344 + 0.75, 50.0, 0, 0);
- Create3DTextLabel(""O"Refil", 0xF67E0FF, 2109.6794, 1553.6306, 11.4344 + 0.75, 50.0, 0, 0);
- CreateObject(3337, 2109.59009, 1555.12195, 14.37300, 0.00000, 0.00000, 0.00000);
- CreateObject(3749, 2080.23389, 1574.94800, 15.22200, 0.00000, 0.49900, 87.59900);
- CreateObject(19128, 2080.35205, 1578.83203, 9.77900, 0.00000, 0.00000, 0.00000);
- CreateObject(19128, 2080.35205, 1574.86096, 9.77900, 0.00000, 0.00000, 0.00000);
- CreateObject(19128, 2080.35205, 1570.93201, 9.77900, 0.00000, 0.00000, 0.00000);
- CreateObject(18769, 2092.41406, 1553.77502, 9.77000, 0.00000, 0.00000, 0.00000);
- CreateObject(18769, 2092.41406, 1573.67395, 9.77000, 0.00000, 0.00000, 0.00000);
- CreateObject(18769, 2112.38403, 1573.67395, 9.77000, 0.00000, 0.00000, 0.00000);
- CreateObject(18769, 2112.38403, 1553.77502, 9.77000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2090.39502, 1543.34705, 13.17000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2085.06201, 1543.29602, 13.17000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2078.03589, 1550.31897, 13.10100, 0.00000, 0.00000, -90.39900);
- CreateObject(19313, 2078.11499, 1561.81799, 13.10100, 0.00000, 0.00000, -90.39900);
- CreateObject(19313, 2089.60693, 1583.69897, 13.09000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2103.59912, 1583.69897, 13.09000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2117.58008, 1583.69897, 13.09000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2117.58008, 1583.69897, 13.09000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2117.58008, 1583.69897, 19.64000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2103.57788, 1583.69897, 19.64000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2089.58789, 1583.69897, 19.64000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2089.58789, 1583.69897, 26.13000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2103.64893, 1583.69897, 26.13000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2117.70190, 1583.69897, 26.13000, 0.00000, 0.00000, 0.00000);
- CreateObject(19313, 2127.18604, 1577.12805, 26.14000, 0.00000, 0.00000, -68.40000);
- CreateObject(19313, 2127.18604, 1577.12805, 19.53000, 0.00000, 0.00000, -68.40000);
- CreateObject(19313, 2127.09399, 1577.28503, 12.88000, 0.00000, 0.00000, -68.40000);
- CreateObject(19313, 2129.44507, 1563.75098, 13.02000, 0.00000, 0.00000, -92.09900);
- CreateObject(19313, 2128.96094, 1550.59204, 13.02000, 0.00000, 0.00000, -92.09900);
- CreateObject(19313, 2128.96094, 1550.59204, 19.54000, 0.00000, 0.00000, -92.09900);
- CreateObject(19313, 2129.48096, 1564.36499, 19.54000, 0.00000, 0.00000, -92.09900);
- CreateObject(19313, 2129.48096, 1564.36499, 26.06000, 0.00000, 0.00000, -92.09900);
- CreateObject(19313, 2128.97803, 1550.66504, 26.06000, 0.00000, 0.00000, -92.09900);
- CreateObject(19313, 2121.67700, 1543.53101, 17.84000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2121.67700, 1543.53101, 24.41000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2107.59595, 1543.40906, 24.41000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2107.59595, 1543.40906, 17.87000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2104.49390, 1543.37097, 17.87000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2104.49390, 1543.37097, 24.48000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2090.47290, 1543.24902, 24.48000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2090.47290, 1543.24902, 17.85000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2084.87012, 1543.35901, 17.85000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2084.87012, 1543.35901, 24.44000, 0.00000, 0.00000, -179.49899);
- CreateObject(19313, 2078.12109, 1550.18701, 19.53000, 0.00000, 0.00000, 89.40000);
- CreateObject(19313, 2078.18994, 1556.88599, 19.53000, 0.00000, 0.00000, 89.40000);
- CreateObject(19313, 2077.90405, 1550.33899, 24.37000, 0.00000, 0.00000, 89.40000);
- CreateObject(19313, 2078.17310, 1556.89600, 24.37000, 0.00000, 0.00000, 89.40000);
- CreateObject(19313, 2081.47290, 1556.97803, 27.55700, -91.00000, -0.09900, 89.40000);
- CreateObject(19313, 2081.21704, 1550.42896, 27.55400, -91.00000, -0.09900, 89.40000);
- CreateObject(19313, 2085.64697, 1576.76404, 29.36600, -91.00000, -0.09900, 89.40000);
- CreateObject(19313, 2085.59009, 1570.39404, 29.36700, -91.00000, -0.09900, 89.40000);
- CreateObject(19313, 2082.87891, 1576.71497, 26.13700, 0.89900, -0.30000, 91.80000);
- CreateObject(19313, 2083.05493, 1571.06799, 26.10700, 0.89900, -0.30000, 91.80000);
- CreateObject(19313, 2083.05493, 1571.06799, 26.10700, 0.89900, -0.30000, 91.80000);
- CreateObject(3624, 2113.56592, 1557.61804, 14.10900, 0.00000, 0.00000, 0.00000);
- CreateObject(8967, 2143.15698, 1603.59998, 74.12100, 0.00000, 0.00000, 0.00000);
- CreateObject(1824, 2105.79199, 1565.78601, 10.98400, 0.00000, 0.00000, 0.00000);
- CreateObject(2592, 2110.51807, 1569.58398, 11.52400, 0.00000, 0.00000, 0.00000);
- CreateObject(19786, 2127.32397, 1554.63306, 13.21400, 0.00000, 0.00000, -89.70000);
- CreateObject(19786, 2127.20801, 1557.61304, 13.21400, 0.00000, 0.00000, -89.70000);
- CreateObject(19786, 2127.18994, 1560.85303, 13.21400, 0.00000, 0.00000, -89.70000);
- CreateObject(1271, 2118.57788, 1554.06396, 10.75400, 0.00000, 0.00000, 0.00000);
- CreateObject(1271, 2118.57788, 1553.31494, 10.75400, 0.00000, 0.00000, 0.00000);
- CreateObject(1271, 2118.57788, 1552.60596, 10.75400, 0.00000, 0.00000, 0.00000);
- CreateObject(1271, 2119.24805, 1552.60596, 10.75400, 0.00000, 0.00000, 0.00000);
- CreateObject(1271, 2119.24805, 1552.60596, 11.47400, 0.00000, 0.00000, 0.00000);
- CreateObject(1271, 2118.51709, 1552.60596, 11.47400, 0.00000, 0.00000, 0.00000);
- CreateObject(1271, 2119.00708, 1552.60596, 12.16400, 0.00000, 0.00000, 0.00000);
- CreateObject(1271, 2119.10693, 1554.18604, 10.81400, 0.00000, 0.00000, 0.00000);
- CreateObject(2040, 2109.42993, 1558.73303, 10.43400, 0.00000, 0.00000, 0.00000);
- CreateObject(362, 2123.70703, 1557.74304, 16.25300, 0.00000, 62.59900, 177.19901);
- CreateObject(19954, 2075.54346, 1580.54089, 9.86133, 0.00000, 0.00000, 0.00000);
- CreateObject(19954, 2071.74854, 1580.56201, 9.86133, 0.00000, 0.00000, 0.00000);
- CreateObject(19954, 2068.32813, 1579.77283, 9.86133, 0.00000, 0.00000, 0.00000);
- CreateObject(19992, 2072.46118, 1539.98352, 9.28836, 0.00000, 0.00000, 0.00000);
- CreateObject(19989, 2072.37720, 1554.67542, 9.85043, 0.00000, 0.00000, 0.00000);
- CreateObject(19976, 2082.93994, 1538.48328, 9.66328, 0.00000, 0.00000, 88.14000);
- Material[0] = CreateObject(4732, 2066.68481, 1570.42908, 12.71268, 0.00000, 0.00000, -125.04000);
- Material[1] = CreateObject(4732, 2066.61182, 1550.26416, 12.71268, 0.00000, 0.00000, -125.04000);
- Material[2] = CreateObject(4732, 2066.55322, 1531.61609, 12.71268, 0.00000, 0.00000, -125.04000);
- Material[3] = CreateObject(4732, 2066.41357, 1545.38684, 12.71268, 0.00000, 0.00000, 54.90002);
- Material[4] = CreateObject(4732, 2066.20654, 1524.10645, 12.78421, 0.00000, 0.00000, -304.85989);
- Material[5] = CreateObject(4732, 2066.44019, 1566.66113, 12.71268, 0.00000, 0.00000, 54.90002);
- Material[6] = CreateObject(4732, 2074.52759, 1588.23987, 12.71268, 0.00000, 0.00000, -171.95984);
- Material[7] = CreateObject(4732, 2074.99438, 1587.61719, 12.71268, 0.00000, 0.00000, -355.19968);
- PMaterial = CreateObject(4732, 2088.54785, 1543.13245, 24.45524, 0.00000, 0.00000, -214.37979);
- SetObjectMaterialText(Material[0], "LV Ammo Nation", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(Material[1], "to ", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(Material[2], "Welcome", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(Material[3], "LV Ammo Nation", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(Material[4], "Have Fun !", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(Material[5], "to", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(Material[6], "Have Fun !", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(Material[7], "Welcome", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- SetObjectMaterialText(PMaterial, ""R""SERVERNAME" \n"O"LV Ammo Nation \n"YE" Hunting and Fishing Like a Boss !", 0, OBJECT_MATERIAL_SIZE_512x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
- CreateObject(19273, 2082.60229, 1581.96765, 12.28170, 0.00000, 0.00000, 83.63994);
- Gate = CreateObject(19912, 2081.8880000,1569.0620000,12.8810000,0.0000000,0.0000000,-92.9000000); //
- Cars[0] = AddStaticVehicle(411,2117.6343,1580.1884,11.1615,178.1517,64,1);
- Cars[1] = AddStaticVehicle(411,2113.3469,1580.1506,11.1620,180.0896,123,1);
- Cars[2] = AddStaticVehicle(447,2089.4739,1552.8013,11.4464,35.4359,75,2);
- Cars[3] = AddStaticVehicle(490,2106.2280,1572.0549,11.5632,94.8587,0,0);
- Cars[4] = AddStaticVehicle(498,2124.2275,1565.0564,10.8888,180.8574,13,120);
- Cars[5] = AddStaticVehicle(428,2109.1694,1548.6055,11.5548,2.8408,4,75);
- vehicle3Dtext[Cars[0]] = Create3DTextLabel( ""R"Infernus \n"YE"For Sale !", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
- Attach3DTextLabelToVehicle( vehicle3Dtext[Cars[0]], Cars[0], 0.0, 0.0, 2.0);
- vehicle3Dtext[Cars[1]] = Create3DTextLabel( ""R"Infernus \n"YE"For Sale !", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
- Attach3DTextLabelToVehicle( vehicle3Dtext[Cars[1]], Cars[1], 0.0, 0.0, 2.0);
- vehicle3Dtext[Cars[2]] = Create3DTextLabel( ""R"Seasparrow \n"YE"For Sale !", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
- Attach3DTextLabelToVehicle( vehicle3Dtext[Cars[2]], Cars[2], 0.0, 0.0, 2.0);
- vehicle3Dtext[Cars[3]] = Create3DTextLabel( ""R"FBI Rancher \n"YE"For Sale !", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
- Attach3DTextLabelToVehicle( vehicle3Dtext[Cars[3]], Cars[3], 0.0, 0.0, 2.0);
- vehicle3Dtext[Cars[4]] = Create3DTextLabel( ""R"BoxVille \n"YE"For Sale !", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
- Attach3DTextLabelToVehicle( vehicle3Dtext[Cars[4]], Cars[4], 0.0, 0.0, 2.0);
- vehicle3Dtext[Cars[5]] = Create3DTextLabel( ""R"Securicar \n"YE"For Sale !", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
- Attach3DTextLabelToVehicle( vehicle3Dtext[Cars[5]], Cars[5], 0.0, 0.0, 2.0);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- MyCar[playerid] = SMyCar[playerid];
- }
- else
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"Ammo Nation v2.0");
- INI_WriteInt(File,"Car", MyCar[playerid]);
- INI_Close(File);
- }
- SpawnArmour[playerid] = 0;
- SpawnProtection[playerid] = 0;
- SPDuration[playerid] = 0;
- Ammo[playerid] = 0;
- MyCar[playerid] = 0;
- SetPlayerMapIcon(playerid, 6, 2085.0610, 1577.1023, 11.4341, 6, 0, MAPICON_LOCAL);
- RemoveBuildingForPlayer(playerid, 3509, 2089.320, 1583.479, 9.726, 0.250);
- RemoveBuildingForPlayer(playerid, 3509, 2089.320, 1566.189, 9.726, 0.250);
- RemoveBuildingForPlayer(playerid, 3509, 2109.050, 1547.270, 9.773, 0.250);
- RemoveBuildingForPlayer(playerid, 8623, 2093.879, 1553.510, 10.570, 0.250);
- RemoveBuildingForPlayer(playerid, 8618, 2093.679, 1553.319, 22.828, 0.250);
- RemoveBuildingForPlayer(playerid, 8971, 2093.679, 1553.319, 22.828, 0.250);
- RemoveBuildingForPlayer(playerid, 1350, 2082.5156, 1538.8125, 9.7891, 0.25);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"Ammo Nation V1.0 Loaded!");
- INI_WriteInt(File, "Car", MyCar[playerid]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(SpawnArmour[playerid] == 1)
- {
- SetPlayerArmour(playerid, 100);
- }
- if(SpawnProtection[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN,"[SP]: Please Don't Abuse Spawn Protection !");
- SetPlayerHealth(playerid, 999999999999999999999999999999999999999.0);
- SetTimerEx("AntiSpawnkill", SPDuration[playerid]*1000, 0, "d", playerid);
- }
- if(SpawnArmour[playerid] == 0 && SpawnProtection[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN,"- Need a S-Armour Protection ? Buy it now at /wshop ");
- SendClientMessage(playerid, COLOR_GREEN,"- Need a Spawn Protection ? Buy it now at /wshop ");
- }
- else if(SpawnArmour[playerid] == 1 && SpawnProtection[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN,"- Need a Spawn Protection ? Buy it now at /wshop ");
- }
- else if(SpawnArmour[playerid] == 0 && SpawnProtection[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN,"- Need a S-Armour Protection ? Buy it now at /wshop ");
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("----------------------------------------");
- print(" AMMO NATION BY Yaa ");
- print("----------------------------------------");
- print("----------------------------------------");
- print(" VERSION : 1.0 ");
- print("----------------------------------------");
- print("----------------------------------------");
- print(" UNLOADED ! ");
- print("----------------------------------------");
- DestroyPickup(AmmoPick[0]);
- DestroyPickup(AmmoPick[1]);
- return 1;
- }
- CMD:wshop(playerid, params[])
- {
- if(isnull(params)) return SendClientMessage(playerid, -1,""R"Usage: "GRI"/wshop [enter/exit]");
- if(!strcmp(params, "enter", true))
- {
- if(Ammo[playerid] == 0)
- {
- SetPlayerPos(playerid, 2085.0610, 1577.1023, 11.4341);
- SendClientMessage(playerid, COLOR_GREEN,"Buy Weapons and start kill !");
- Ammo[playerid] = 1;
- }
- else return SendClientMessage(playerid, -1,""R"Error: "GRI"You are already in Ammo Nation Area");
- return 1;
- }
- if(!strcmp(params, "exit", true))
- {
- if(Ammo[playerid] == 1)
- {
- SetPlayerPos(playerid, 2078.1628, 1573.6301, 11.4341);
- SendClientMessage(playerid, COLOR_GREEN," Enjoy ! ");
- Ammo[playerid] = 0;
- }
- else return SendClientMessage(playerid, -1,""R"Error: "GRI"You are not in Ammo Nation Area");
- }
- else return SendClientMessage(playerid, -1,""R"Usage: "GRI"/wshop [enter/exit]");
- return 1;
- }
- CMD:mycar(playerid, params[])
- {
- if(MyCar[playerid] == 0) return SendClientMessage(playerid, -1,""R"Error: "GRI"You Need To Buy a car first (/WSHOP)");
- new Float:X, Float:Y, Float:Z, Float:Angle, PrivateCar, str[20], str2[50];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Angle);
- PrivateCar = CreateVehicle(MyCar[playerid], X, Y, Z, Angle, -1, -1, 30, 1);
- format(str, sizeof(str),"%s", GetName(playerid));
- SetVehicleNumberPlate(PrivateCar, str);
- format(str2, sizeof(str2),""R"%s's Car", GetName(playerid));
- vehicle3Dtext[PrivateCar] = Create3DTextLabel(str2, -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle( vehicle3Dtext[PrivateCar], PrivateCar, 0.0, 0.0, 2.0);
- PutPlayerInVehicle(playerid, PrivateCar, 0);
- SendClientMessage(playerid, -1,""O"Success : "GRI"Enjoy with u car! ");
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(AmmoPick[0] == pickupid)
- {
- ShowPlayerDialog(playerid, 6485, DIALOG_STYLE_LIST, "Weapons", "9mm \nSilenced 9mm \nTec9 \nShotgun \nUzi \nMP5 \nAK-47 \nM4 \nSniper \nMore", "Select", "Cancel");
- }
- else if(AmmoPick[1] == pickupid)
- {
- ShowPlayerDialog(playerid, 6458, DIALOG_STYLE_LIST, "Refil", ""R"Spawn Protection \n"O"Spawn Armour(10 000 $) \n"YE"Regular Armour(2000 $) ", "Select", "Cancel");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 6485)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 600 $ For buy this weapon");
- GivePlayerMoney(playerid, -600);
- GivePlayerWeapon(playerid,22, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`9mm Pistol`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 900) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 900 $ For buy this weapon");
- GivePlayerMoney(playerid, -900);
- GivePlayerWeapon(playerid,23, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`9mm Silenced Pistol`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- TogglePlayerControllable(playerid,1);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 1200 $ For buy this weapon");
- GivePlayerWeapon(playerid,32, 500);
- GivePlayerMoney(playerid, -1200);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Tec9`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 3300) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 3300 $ For buy this weapon");
- GivePlayerMoney(playerid, -3300);
- GivePlayerWeapon(playerid,25, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Shotgun`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) < 1900) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 1900 $ For buy this weapon");
- GivePlayerMoney(playerid, -1900);
- GivePlayerWeapon(playerid,28, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Uzi`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 1500 $ For buy this weapon");
- GivePlayerMoney(playerid, -1500);
- GivePlayerWeapon(playerid,29, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`MP5`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 6)
- {
- if(GetPlayerMoney(playerid) < 4900) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 4900 $ For buy this weapon");
- GivePlayerMoney(playerid, -4900);
- GivePlayerWeapon(playerid,30, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`AK-47`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 7)
- {
- if(GetPlayerMoney(playerid) < 5500) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 5500 $ For buy this weapon");
- GivePlayerMoney(playerid, -5500);
- GivePlayerWeapon(playerid,31, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`M4`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 8)
- {
- if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 5000 $ For buy this weapon");
- GivePlayerMoney(playerid, -5000);
- GivePlayerWeapon(playerid,34, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Sniper`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 9)
- {
- ShowPlayerDialog(playerid, 6486, DIALOG_STYLE_LIST, "Weapons", "Sawnoff Shotgun \nDesert Eeagle \nKnife \nCombat Shotgun", "Select", "Cancel");
- }
- }
- else return SendClientMessage(playerid, -1, ""R"You Cancelled !");
- }
- if(dialogid == 6486)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 2500 $ For buy this weapon");
- GivePlayerMoney(playerid, -2500);
- GivePlayerWeapon(playerid,26, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Sawnoff Shotgun`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 3000 $ For buy this weapon");
- GivePlayerMoney(playerid, -3000);
- GivePlayerWeapon(playerid,24, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Desert Eeagle`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- TogglePlayerControllable(playerid,1);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 500 $ For buy this weapon");
- GivePlayerMoney(playerid, -500);
- GivePlayerWeapon(playerid,4, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Knife`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 4500) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 4500 $ For buy this weapon");
- GivePlayerMoney(playerid, -4500);
- GivePlayerWeapon(playerid,27, 500);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With using "R"`Combat Shotgun`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- }
- else return SendClientMessage(playerid, -1, ""R"You Cancelled !");
- }
- if(dialogid == 6458)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, 6459, DIALOG_STYLE_LIST, "Spawn Protection", "SP: 15 sec \nSP: 30 sec \nSP: 60 sec", "Select", "Cancel");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 10 000 $ For buy this protection");
- SpawnArmour[playerid] = 1;
- GivePlayerMoney(playerid, -10000);
- SetPlayerArmour(playerid, 100);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With You "R"`Spawn Armour`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 2000 $ For buy this protection");
- GivePlayerMoney(playerid, -2000);
- SetPlayerArmour(playerid, 100);
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With You "R"`Regular Armour`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- }
- else return SendClientMessage(playerid, -1, ""R"You Cancelled !");
- }
- if(dialogid == 6459)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 30 000 $ For buy this protection");
- GivePlayerMoney(playerid, -30000);
- SpawnProtection[playerid] = 1;
- SPDuration[playerid] = 15;
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With You "R"`Spawn Protection (15 sec)`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 60 000 $ For buy this protection");
- GivePlayerMoney(playerid, -60000);
- SpawnProtection[playerid] = 1;
- SPDuration[playerid] = 30;
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With You "R"`Spawn Protection (30 sec)`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 120000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 120 000 $ For buy this protection");
- SpawnProtection[playerid] = 1;
- GivePlayerMoney(playerid, -120000);
- SPDuration[playerid] = 60;
- new name[256];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Enjoy, Mr %s With You "R"`Spawn Protection (1 min)`.", name);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- }
- else return SendClientMessage(playerid, -1, ""R"You Cancelled !");
- }
- if(dialogid == 6481)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -5000000);
- SendClientMessage(playerid, -1, ""R"Success: "GRI" Enjoy With You car ! Now u can use /mycar");
- MyCar[playerid] = 411;
- }
- }
- if(dialogid == 6482)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -3000000);
- SendClientMessage(playerid, -1, ""R"Success: "GRI" Enjoy With You car ! Now u can use /mycar");
- MyCar[playerid] = 447;
- }
- }
- if(dialogid == 6473)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -8000000);
- SendClientMessage(playerid, -1, ""R"Success: "GRI" Enjoy With You car ! Now u can use /mycar");
- MyCar[playerid] = 447;
- }
- }
- if(dialogid == 6474)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -8000000);
- SendClientMessage(playerid, -1, ""R"Success: "GRI" Enjoy With You car ! Now u can use /mycar");
- MyCar[playerid] = 447;
- }
- }
- if(dialogid == 6475)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -10000000);
- SendClientMessage(playerid, -1, ""R"Error: "GRI" Enjoy With You car ! Now u can use /mycar");
- MyCar[playerid] = 447;
- }
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(GetPlayerVehicleID(playerid) == Cars[0] || GetPlayerVehicleID(playerid) == Cars[1])
- {
- if(GetPlayerMoney(playerid) < 5000000)
- {
- SendClientMessage(playerid, -1, ""R"Error: "GRI" You Need 5 000 000 $ For Buy this car !");
- RemovePlayerFromVehicle(playerid);
- }
- else return ShowPlayerDialog(playerid, 6481, DIALOG_STYLE_MSGBOX, "Infernus", "Do You want Buy this Infernus ?", "Yes", "No");
- }
- else if(GetPlayerVehicleID(playerid) == Cars[2])
- {
- if(GetPlayerMoney(playerid) < 3000000)
- {
- SendClientMessage(playerid, -1, ""R"Error: "GRI" You Need 3 000 000 $ For Buy this car !");
- RemovePlayerFromVehicle(playerid);
- }
- else return ShowPlayerDialog(playerid, 6482, DIALOG_STYLE_MSGBOX, "Othes", "Do You want Buy this Car / Heli ?", "Yes", "No");
- }
- else if(GetPlayerVehicleID(playerid) == Cars[3])
- {
- if(GetPlayerMoney(playerid) < 8000000)
- {
- SendClientMessage(playerid, -1, ""R"Error: "GRI" You Need 8 000 000 $ For Buy this car !");
- RemovePlayerFromVehicle(playerid);
- }
- else return ShowPlayerDialog(playerid, 6473, DIALOG_STYLE_MSGBOX, "Othes", "Do You want Buy this Car / Heli ?", "Yes", "No");
- }
- else if(GetPlayerVehicleID(playerid) == Cars[4])
- {
- if(GetPlayerMoney(playerid) < 8000000)
- {
- SendClientMessage(playerid, -1, ""R"Error: "GRI" You Need 8 000 000 $ For Buy this car !");
- RemovePlayerFromVehicle(playerid);
- }
- else return ShowPlayerDialog(playerid, 6474, DIALOG_STYLE_MSGBOX, "Othes", "Do You want Buy this Car / Heli ?", "Yes", "No");
- }
- else if(GetPlayerVehicleID(playerid) == Cars[5])
- {
- if(GetPlayerMoney(playerid) < 10000000)
- {
- SendClientMessage(playerid, -1, ""R"Error: "GRI" You Need 10 000 000 $ For Buy this Heli !");
- RemovePlayerFromVehicle(playerid);
- }
- else return ShowPlayerDialog(playerid, 6475, DIALOG_STYLE_MSGBOX, "Othes", "Do You want Buy this Car / Heli ?", "Yes", "No");
- }
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == WSCP[0])
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, ""R"Error: "GRI"We are not able to open gate (You need car or use /wshop)");
- MoveObject(Gate, 2081.88794, 1569.06201, 17.23653, 2.00);
- SetTimer("GateTimer", 5000, false);
- }
- else if(checkpointid == WSCP[1])
- {
- MoveObject(Gate, 2081.88794, 1569.06201, 17.23653, 2.00);
- SendClientMessage(playerid, COLOR_GREEN, "Thank You For Visiting our Ammo Nation !");
- SetTimer("GateTimer", 10000, false);
- }
- return 1;
- }
- public AntiSpawnkill(playerid)
- {
- SetPlayerHealth(playerid, 100.0);
- GameTextForPlayer(playerid, "~g~Spawn Protection ~r~Over, ~b~Move !", 3000, 4);
- return 1;
- }
- public LoadUser_Car(playerid,name[],value[])
- {
- INI_Int("Car", SMyCar[playerid]);
- return 1;
- }
- public GateTimer()
- {
- MoveObject(Gate, 2081.8880000, 1569.0620000, 12.8810000, 2.00);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[100];
- format(string,sizeof(string),"/Ammo/%s.ini",GetName(playerid));
- return string;
- }
- stock GetName(playerid)
- {
- new szName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, szName, sizeof(szName));
- return szName;
- }
- // End of Script ===================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement