/* //------------------------------------------------------------------------------ // // TAXI miniMission Filter Script v1.0 // Designed for SA-MP v0.2.1 // // Created by zeruel_angel // //------------------------------------------------------------------------------ In order to make this Filter Script to work, you need to: 1) Copy the content of "FILES" folder into your FilterScritp folder 2) Add this filtescript into your server by opening "server.cfg" and adding "TAXI" at the end of "filterscripts" line. It should look like this: "filterscripts adminspec actions TAXI" 3) Give me credits about this. //------------------------------------------------------------------------------ TO CHANGE TAXI FEE, YOU HAVE TO EDIT LINE 12 & 13 #define BAJADA_DE_BANDERA 200 #define PRECIO_FICHA 100 200 is the initial fee and 100 is the fee every 30 seconds //------------------------------------------------------------------------------ You can: 1) Use this filterscript on your server 2) Copy, modified, reverse enginier, use part, and play with the source code 3) Redistribute it //------------------------------------------------------------------------------ You CAN'T 1) Claim you are the owner 2) Ask money for it 3) Pay for it 4) Erase me from the credits //------------------------------------------------------------------------------ PM me if you have any question "FORUM.SA-MP.COM" USER "zeruel_angel" */ //------------------------------------------------------------------------------ // // TAXI miniMission Filter Script v1.0 // Designed for SA-MP v0.2.1 // // Created by zeruel_angel // //------------------------------------------------------------------------------ #include <a_samp> #define BAJADA_DE_BANDERA 200 #define PRECIO_FICHA 100 new OnTaxiAsPassenger[MAX_PLAYERS]; new CostoDelViaje[MAX_PLAYERS]; new contador[MAX_PLAYERS]; new playerInMiniMission[MAX_PLAYERS]; new avisado[MAX_PLAYERS]; new caidadefichaTimer; new cantidadPasajeros; forward terminarMission(playerid); forward caidadeficha(); public OnFilterScriptInit() { print("\n TAXI Filter Script v1.0 Loading...\n**********************\n (Zeruel_Angel)\n"); for (new i=0;i<MAX_PLAYERS;i++) { playerInMiniMission[i]=-1; avisado[i]=-1; OnTaxiAsPassenger[i]=-1; } caidadefichaTimer=-1; cantidadPasajeros=0; SetTimer("caidadeficha",30000,1); print("TAXI Filter Script fully Loaded\n**********************************\n\n"); } public OnFilterScriptExit() { print("\n**********************\n*TAXI Script UnLoaded*\n**********************\n"); return 1; } //------------------------------------------------------------------------------------------------------ public terminarMission(playerid) { new msg[255]; format(msg,sizeof(msg),"~r~TAXI ~w~MiniMission cancelled~n~ You carried ~r~%d~w~ pasengers.",contador[playerid]); GameTextForPlayer(playerid,msg,3000,4); playerInMiniMission[playerid]=-1; avisado[playerid]=-1; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); format(msg,sizeof(msg),"***ATENTION: %s Is NOT a TAXI DRIVER anymore***",name); GetPlayerName(playerid,name,MAX_PLAYER_NAME); for (new i=0;i<MAX_PLAYERS;i++) { if (playerid!=i) { SendClientMessage(i,0xFFFF00AA," "); SendClientMessage(i,0xFFFF00AA,msg); } } for (new i=0;i<MAX_PLAYERS;i++) { if (OnTaxiAsPassenger[i]==playerid) { new taxista = playerid; OnTaxiAsPassenger[i]=-1; new viaje=CostoDelViaje[i]; format(msg,sizeof(msg),"~w~You pay to ~g~%s ~n~~r~$%d~w~ for the ~r~taxi~w~ ride.",name,viaje); GameTextForPlayer(i,msg,3000,4); format(msg,sizeof(msg),"~w~You get ~r~$%d~w~ ~n~for the ~r~taxi~w~ ride.",viaje); GameTextForPlayer(taxista,msg,3000,4); GivePlayerMoney(i,-viaje); GivePlayerMoney(taxista,viaje); cantidadPasajeros--; if (cantidadPasajeros==0) { KillTimer(caidadefichaTimer); } } } contador[playerid]=0; return 1; } //------------------------------------------------------------------------------------------------------ public caidadeficha() { for (new i=0;i<MAX_PLAYERS;i++) { CostoDelViaje[i]=CostoDelViaje[i]+PRECIO_FICHA; } } //------------------------------------------------------------------------------------------------------ public OnPlayerStateChange(playerid, newstate, oldstate) { new msg[255]; if (newstate==PLAYER_STATE_DRIVER) { if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 420) { if (avisado[playerid]==-1) { GameTextForPlayer(playerid,"~w~Press ~b~Buttom 2~n~~w~to start the ~n~~r~TAXI~w~ Minimissions.",3000,5); } else { KillTimer(avisado[playerid]); avisado[playerid]=-1; } } } if (newstate==PLAYER_STATE_ONFOOT) { if ((playerInMiniMission[playerid]>0)&&(avisado[playerid]==-1)) { GameTextForPlayer(playerid,"~w~You have ~r~10 sec ~n~~w~ to enter a ~r~TAXI",3000,4); avisado[playerid]=SetTimerEx("terminarMission",10000,0,"%d",playerid); } if (OnTaxiAsPassenger[playerid]!=-1) { new taxista = OnTaxiAsPassenger[playerid]; new name[MAX_PLAYER_NAME]; GetPlayerName(taxista,name,MAX_PLAYER_NAME); OnTaxiAsPassenger[playerid]=-1; new viaje = CostoDelViaje[playerid]; format(msg,sizeof(msg),"~w~You pay to ~g~%s ~n~~r~$%d~w~ for the ~r~taxi~w~ ride.",name,viaje); GameTextForPlayer(playerid,msg,3000,4); format(msg,sizeof(msg),"~w~You get ~r~$%d~w~ ~n~for the ~r~taxi~w~ ride.",viaje); GameTextForPlayer(taxista,msg,3000,4); GivePlayerMoney(playerid,-viaje); GivePlayerMoney(taxista,viaje); cantidadPasajeros--; if (cantidadPasajeros==0) { KillTimer(caidadefichaTimer); } } } if (newstate==PLAYER_STATE_PASSENGER) { if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 420) { new i=0; while (i<MAX_PLAYERS) { if ((playerInMiniMission[i]==1)&&(GetPlayerState(i)==PLAYER_STATE_DRIVER)) { if (GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(i,name,MAX_PLAYER_NAME); contador[i]++; format(msg,sizeof(msg),"~w~You have gotten into ~n~~g~%s's ~r~TAXI~w~",name); GameTextForPlayer(playerid,msg,3000,4); format(msg,sizeof(msg),"~w~You have one new~n~~r~PASENGER~w~"); GameTextForPlayer(playerid,msg,3000,4); OnTaxiAsPassenger[playerid]=i; CostoDelViaje[playerid]=BAJADA_DE_BANDERA; if (cantidadPasajeros==0) { caidadefichaTimer=SetTimer("caidadeficha",30000,1); } cantidadPasajeros++; i=MAX_PLAYERS; } } i++; } } } return 1; } //------------------------------------------------------------------------------------------------------ MissionIni(playerid) { playerInMiniMission[playerid]=1; GameTextForPlayer(playerid,"~r~TAXI ~w~MiniMision ~w~iniciada",3000,4); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); new msg[255]; format(msg,sizeof(msg),"***ATENTION: %s is now a TAXI DRIVER***",name); for (new i=0;i<MAX_PLAYERS;i++) { if (playerid!=i) { SendClientMessage(i,0xFFFF00AA," "); SendClientMessage(i,0xFFFF00AA,msg); } } return 1; } //------------------------------------------------------------------------------------------------------ public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if ((newkeys==KEY_SUBMISSION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) { if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 420) { if (playerInMiniMission[playerid]<0) { MissionIni(playerid); } else { terminarMission(playerid); } } } } //------------------------------------------------------------------------------------------------------ public OnPlayerDisconnect(playerid) { if (playerInMiniMission[playerid]>0) { terminarMission(playerid); } OnTaxiAsPassenger[playerid]=-1; return 1; }
oh ok i understand you mean to put in code brackets
it says copy content of files folder it means scriptfiles folder?? |