Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===========================================>DESCRIZIONE<======================
- // • Anti Caduta - V.1
- // • Usa /AFAttiva /AFDisattiva.
- // • Ributta il player sulla moto.
- // • Possibilità Di Non cadere dalla moto.
- // • Spawna moto tramite menù /moto.
- // • Non Rimuovere i Crediti. FilterScript Copyright Ufficiale ©.
- //===========================================>INCLUDE<==========================
- #include <a_samp>
- //===========================================>FILTERSCRIPT<=====================
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- //===========================================>FORWARD<==========================
- forward msgauto();
- //===========================================>NEWS<=============================
- new Menu:MotoMenu;
- new MODELLO[MAX_PLAYERS];
- new AZIONE[MAX_PLAYERS];
- new DENTRO[MAX_PLAYERS];
- new msg = 0;
- //===========================================>DEFINE<===========================
- #define PASSEGERO 1 //2
- #define GUIDA 0
- //===========================================>COLORI<===========================
- #define VERDE 0x00FF00AA
- #define BIANCO 0xFFFFFFAA //COLORI ITALIANI
- #define ROSSO 0xFF0000AA
- //===========================================>INIT<=============================
- public OnFilterScriptInit()
- {
- print("--------------------------------");
- print(" N - Anti Fall Niko_Hs™ ");
- print(" Versione Numero 1 ");
- print(" Caricato ");
- print("--------------------------------");
- SetTimer("msgauto", 60000, 1);
- MotoMenu = CreateMenu("MotoMenu", 1, 200.0, 100.0, 150.0, 150.0);
- AddMenuItem(MotoMenu, 0, "Nrg-500");
- AddMenuItem(MotoMenu, 0, "Fcr-900");
- AddMenuItem(MotoMenu, 0, "Pcj-600");
- AddMenuItem(MotoMenu, 0, "Bf-400");
- AddMenuItem(MotoMenu, 0, "HPV1000");
- AddMenuItem(MotoMenu, 0, "PizzaBoy");
- AddMenuItem(MotoMenu, 0, "Faggio");
- AddMenuItem(MotoMenu, 0, "Quad");
- AddMenuItem(MotoMenu, 0, "Freeway");
- return 1;
- }
- //===========================================>EXIT<=============================
- public OnFilterScriptExit()
- {
- print(" N - Anti Fall Niko_Hs™ ");
- print(" Versione Numero 1 ");
- print(" Chiuso ");
- return 1;
- }
- //===========================================>END<==============================
- #endif
- //===========================================>COMANDI<==========================
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- //===========================================>ATTIVA<===========================
- if (strcmp("/AfAttiva", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, VERDE, "{00FF00}Hai Attivato {FFFFFF}L'Anti-Caduta. {FF0000}Usa (/AfDisattiva) Per Disattivare");
- GameTextForPlayer(playerid, "~h~~g~Anti ~h~~w~Caduta ~h~~r~Attivato!",5000,5);
- new name[MAX_PLAYER_NAME], string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "{00FF00}%s {FFFFFF}Ha Attivato {FF0000}L'Anti-Caduta! (/AfAttiva)",name);
- SendClientMessageToAll(BIANCO, string);
- AZIONE[playerid] = 1;
- return 1;
- }
- //===========================================>DISATTIVA<========================
- if (strcmp("/AfDisattiva", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, ROSSO, "{00FF00}Hai Disattivato {FFFFFF}L'Anti-Caduta. {FF0000}Usa (/AfAttiva) Per Attivare.");
- GameTextForPlayer(playerid, "~h~~g~Anti ~h~~w~Caduta ~h~~r~Disattivato!",5000,5);
- new name[MAX_PLAYER_NAME], string[256];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "{00FF00}%s {FFFFFF}Ha Disattivato {FF0000}L'Anti-Caduta! (/AfDisattiva)",name);
- SendClientMessageToAll(VERDE, string);
- AZIONE[playerid] = 0;
- return 1;
- }
- //===========================================>INFO.CMD<=========================
- if (strcmp("/infoaf", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, VERDE, "___|[FS] By Niko_Hs™|___");
- SendClientMessage(playerid, BIANCO, "[TUTTI I COMANDI]: ");
- SendClientMessage(playerid, ROSSO, "[ATTIVA] : /AFATTIVA");
- SendClientMessage(playerid, VERDE, "[DISATTIVA] : /AFDISATTIVA");
- SendClientMessage(playerid, BIANCO, "[INFO] : Attivando l'anti-caduta non puoi cadere dai veicoli.");
- SendClientMessage(playerid, ROSSO, "[INFO] : Disattivando l'anti-caduta puoi cadere dai veicoli.");
- SendClientMessage(playerid, VERDE, "[INFO.VEICOLO] : Usa /Moto per avere una moto tramite menù.");
- return 1;
- }
- //===========================================>MENU MOTO.CMD<====================
- //MENU
- if (strcmp(cmdtext, "/Moto",true)==0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- ShowMenuForPlayer(MotoMenu,playerid);
- }
- else
- {
- SendClientMessage(playerid,ROSSO,"Sei Già in un Veicolo!");
- }
- return 1;
- }
- return 0;
- }
- //===========================================>MSG.AUTO<=========================
- public msgauto() {
- switch (msg) {
- case 0: SendClientMessageToAll(VERDE, "Attiva o Disattiva L'Anti-Caduta, /afattiva /afdisattiva, prendi veicolo con /moto."), msg = 1;
- case 1: SendClientMessageToAll(VERDE, "Anti-Caduta leggi più info /Infoaf"), msg = 0;
- }
- }
- //===========================================>STATE.CHANGE<=====================
- public OnPlayerStateChange(playerid, newstate, oldstate) //Azione
- {
- //===========================================>GUIDA<============================
- if(AZIONE[playerid] == 1)
- {
- if(oldstate == PLAYER_STATE_DRIVER)
- {
- if(newstate == PLAYER_STATE_ONFOOT)
- {
- if(DENTRO[playerid] == 1) //Funzione
- {
- PutPlayerInVehicle(playerid, MODELLO[playerid], GUIDA); //Dentro
- }
- }
- }
- //===========================================>PASSEGERO<========================
- if(oldstate == PLAYER_STATE_PASSENGER)
- {
- if(newstate == PLAYER_STATE_ONFOOT)
- {
- if(DENTRO[playerid] == 1) //Automatico
- {
- PutPlayerInVehicle(playerid, MODELLO[playerid], PASSEGERO); //Dentro
- }
- }
- }
- //===========================================>FUNZIONE.AUTO<====================
- if(oldstate == PLAYER_STATE_ONFOOT)
- {
- if(newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)
- {
- DENTRO[playerid] = 1; //Automatico
- MODELLO[playerid] = GetPlayerVehicleID(playerid); //Modello
- }
- }
- }
- return 1;
- }
- //===========================================>EXIT.V<===========================
- public OnPlayerExitVehicle(playerid, vehicleid) //Rientra Automaticamente
- {
- DENTRO[playerid] = 0; //Funzione
- return 1;
- }
- //===========================================>EXIT.M<===========================
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- //===========================================>SELEZIONE<========================
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- new Menu:CurrentMenu = GetPlayerMenu(playerid);
- if(CurrentMenu == MotoMenu)
- {
- switch(row)
- {
- case 0: //Nrg-500
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new nrg;
- nrg=CreateVehicle(522, x+3, y, z, 900.00, -1, -1, 120);
- PutPlayerInVehicle(playerid, nrg,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato una Nrg-500");
- }
- //==============================================================================
- case 1: //Fcr-900
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new FCR;
- FCR=CreateVehicle(521, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, FCR,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato una Fcr-900");
- }
- //==============================================================================
- case 2: //Pcj-600
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new PCJ;
- PCJ=CreateVehicle(461, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, PCJ,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato una Pcj-600");
- }
- //==============================================================================
- case 3: //Bf-400
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new bf;
- bf=CreateVehicle(581, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, bf,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato una Bf-400");
- }
- //==============================================================================
- case 4: //HPV1000
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new HPV1000;
- HPV1000=CreateVehicle(523, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, HPV1000,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato una HPV1000");
- }
- //==============================================================================
- case 5: //Pizzaboy
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new pizzaboy;
- pizzaboy=CreateVehicle(448, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, pizzaboy,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato un PizzaBoy");
- }
- //==============================================================================
- case 6: //Faggio
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new faggio;
- faggio=CreateVehicle(462, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, faggio,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato un Faggio");
- }
- //==============================================================================
- case 7: //Quad
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new quad;
- quad=CreateVehicle(471, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, quad,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato un Quad");
- }
- //==============================================================================
- case 8: //FreeWay
- {
- new Float:x;new Float:y;new Float:z;
- GetPlayerPos(playerid, x, y, z);
- new freeway;
- freeway=CreateVehicle(463, x+3, y, z, 900.00, -1, -1, -1);
- PutPlayerInVehicle(playerid, freeway,0);
- SendClientMessage(playerid, VERDE, "Hai spawnato una FreeWay");
- }
- }
- }
- return 1;
- }
- //===========================================>FINE<=============================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement