Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*******************************************************************************
- * ---===[FO]Tommy guns Filterscript] ===--- *
- * --- Version 1.1 --- *
- * "Copyright @ [FO]Tommy" *
- * Novità: Altre armi, un sistema di kick se un player va sotto lo 0 *
- * Si prega di non togliere i diritti. *
- *******************************************************************************/
- #include <a_samp>
- new
- bool:check[MAX_PLAYERS];
- //COLORI//
- #define COLOR_YELLOWGREEN 0x9ACD32AA //verde militare
- #define COLOR_GREY 0xAFAFAFAA //grigio
- #define COLOR_LIGHTGREEN 0x81F628AA //verde chiaro
- #define COLOR_YELLOW 0xFFFF00AA //giallo
- #define COLOR_LIGHTBLUE 0x33CCFFAA //azzurro
- #define COLOR_BLUE 0x0050F6AA //blu
- #define COLOR_GREEN 0x33AA33AA // verde
- #define COLOR_RED 0xF60000AA // rosso
- #define COLOR_ORANGE 0xFF9900AA //arancione
- #define COLOR_LIGHTRED 0xF60000AA //rosso acceso
- #define COLOR_WHITE 0xFFFFFFFF //bianco
- #define COLOR_BLACK 0x000000AA //nero
- #define COLOR_PINK 0xFF66FFAA //rosa
- #define COLOR_GOLD 0xE3B515AA //oro
- //FINE COLORI//
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Armi By [FO]Tommy LOADED");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Armi By [FO]Tommy UNLOADED");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp(cmdtext, "/armi", true) == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "**** ARMI DISPONIBILI A COSTO 500$ OGNIUNA ****");
- SendClientMessage(playerid, -1, "/9mm - /Desert");
- SendClientMessage(playerid, -1, "/Granate /Coltello");
- SendClientMessage(playerid, -1, "/SMG /Tec9");
- SendClientMessage(playerid, -1, "/Paracadute");
- SendClientMessage(playerid, COLOR_RED, "Per le armi costose oltre i 1000$ e potenti scrivi /armi2");
- return 1;
- }
- if (strcmp(cmdtext, "/armi2", true) == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "**** ARMI PESANTI DISPONIBILI ****");
- SendClientMessage(playerid, COLOR_RED, "/FPM 4000$ 1000 Muniz. /FCM 5000$ 1000 Muniz.");
- SendClientMessage(playerid, COLOR_RED, "/AK-47 3000$ 1000 Muniz. /MP5 3000$ 1000 Muniz.");
- SendClientMessage(playerid, COLOR_RED, "/RPG 5000$ 500 Muniz. /minigun 10000$ 5000 Muniz.");
- SendClientMessage(playerid, COLOR_RED, "/Lanciarazzi 10000$ 100 Muniz.");
- SendClientMessage(playerid, COLOR_RED, "/Snipe 1500$ 100 Muniz.");
- return 1;
- }
- if(strcmp(cmdtext, "/9mm", true) == 0)
- {
- GivePlayerWeapon(playerid, 22, 1000);
- GivePlayerMoney(playerid, -250);
- SendClientMessage(playerid, COLOR_PINK, "Hai comprato una 9mm con 1000 Munizioni, al costo di 250$");
- return 1;
- }
- if(strcmp(cmdtext, "/desert", true) == 0)
- {
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerMoney(playerid, -500);
- SendClientMessage(playerid, COLOR_GREEN, "Ha comprato una DesertEagle con 1000 Munizioni, ti sono costate 500$");
- return 1;
- }
- if(strcmp(cmdtext, "/granate", true) == 0)
- {
- GivePlayerWeapon(playerid, 16, 500);
- GivePlayerMoney(playerid, -1000);
- SendClientMessage(playerid, COLOR_GREEN, "Hai comprato 500 Granate, ti sono costate 1000$");
- return 1;
- }
- if(strcmp(cmdtext, "/coltello", true) == 0)
- {
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerMoney(playerid, -100);
- SendClientMessage(playerid, COLOR_YELLOW, "Hai comprato un coltello al costo di 100$");
- return 1;
- }
- if(strcmp(cmdtext, "/fpm", true) == 0)
- {
- GivePlayerWeapon(playerid, 26, 1000);
- GivePlayerMoney(playerid, -4000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Hai comprato un fucile a pompa con 1000 munizioni.");
- return 1;
- }
- if(strcmp(cmdtext, "/fcm", true) == 0)
- {
- GivePlayerWeapon(playerid, 27, 1000);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, COLOR_LIGHTRED, "Hai comprato un fulcile a pompa da combattimento con 1000 munizzioni");
- return 1;
- }
- if(strcmp(cmdtext, "/smg", true) == 0)
- {
- GivePlayerWeapon(playerid, 29, 1000);
- GivePlayerMoney(playerid, -1000);
- SendClientMessage(playerid, COLOR_YELLOW, "Hai comprato un SMG con 1000 Munizioni e la hai pagata 1000$");
- return 1;
- }
- if(strcmp(cmdtext, "/tec9", true) == 0)
- {
- GivePlayerWeapon(playerid, 32, 5000);
- GivePlayerMoney(playerid, -1000);
- SendClientMessage(playerid, COLOR_YELLOW, "Hai comprato un Tec9 con 5000 Munizioni e la hai pagata 1000$");
- return 1;
- }
- if(strcmp(cmdtext, "/uzi", true) == 0)
- {
- GivePlayerWeapon(playerid, 28, 1000);
- GivePlayerMoney(playerid, -800);
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "Hai Comprato due mitragliette Uzi con 1000 Munizioni al costo di 800$");
- return 1;
- }
- if(strcmp(cmdtext, "/ak47", true) == 0)
- {
- GivePlayerWeapon(playerid, 30, 1000);
- GivePlayerMoney(playerid, -3000);
- SendClientMessage(playerid, COLOR_GREEN, "Hai comprato un AK-47 con 1000 Munizioni.");
- return 1;
- }
- if(strcmp(cmdtext, "/rpg", true) == 0)
- {
- GivePlayerWeapon(playerid, 35, 500);
- GivePlayerMoney(playerid, -5000);
- SendClientMessage(playerid, COLOR_RED, "Hai comprato un RPG con 500 Munizioni!");
- return 1;
- }
- if(strcmp(cmdtext, "/mp5", true) == 0)
- {
- GivePlayerWeapon(playerid, 29, 1000);
- GivePlayerMoney(playerid, -3000);
- SendClientMessage(playerid, COLOR_LIGHTRED, "Hai comprato un MP5 con 1000 Munizioni.");
- return 1;
- }
- if(strcmp(cmdtext, "/snipe", true) == 0)
- {
- GivePlayerWeapon(playerid, 34, 100);
- GivePlayerMoney(playerid, -1500);
- SendClientMessage(playerid, COLOR_YELLOW, "Hai comprato un Fucile di precisione con 100 Munizioni");
- return true;
- }
- if(strcmp(cmdtext, "/minigun", true) == 0)
- {
- GivePlayerWeapon(playerid, 38, 5000);
- GivePlayerMoney(playerid, -10000);
- SendClientMessage(playerid, COLOR_GOLD, "Hai preso un Minigun con 5000 Muniz, fanne buon uso!");
- return true;
- }
- if(strcmp(cmdtext, "/lanciarazzi", true) == 0)
- {
- GivePlayerWeapon(playerid, 36, 100);
- GivePlayerMoney(playerid, -10000);
- SendClientMessage(playerid, COLOR_GOLD, "Hai preso un Lanciarazzi a ricerca termica con 100 Muniz. fanne buon uso!");
- return true;
- }
- if(strcmp(cmdtext, "/paracadute", true) == 0)
- {
- GivePlayerWeapon(playerid, 46, 1);
- GivePlayerMoney(playerid, -100);
- SendClientMessage(playerid, COLOR_GREEN, "Hai preso un paracadute per 100$");
- return true;
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- check[playerid] = false;
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(GetPlayerMoney(playerid) < 0 && check[playerid] == false) {
- check[playerid] = true;
- SetTimerEx("timer",180000*30,false,"d",playerid);
- SendClientMessage(playerid, 0xff000000, "Hai 30 minuti per recuparare i soldi o verrai kickato!");
- }
- return 1;
- }
- forward timer(playerid);
- public timer(playerid) {
- if(GetPlayerMoney(playerid) < 0 && check[playerid] == true) {
- SendClientMessage(playerid, -1, "Sei stato kickato per aver avuto i soldi sotto 0");
- SendClientMessageToAll(-1, "E' stato kikkato un players per essere andato sotto con i soldi e non aver recuperato entro il tempo previsto");
- Kick(playerid);
- }
- check[playerid] = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement