04.06.2012, 17:13
Код:
#include <a_samp> #define COLOR_DARKGOLD 0x808000AA #define COLOR_RED 0xFF0000AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_DARKGOLD 0x808000AA #define COLOR_RED 0xFF0000AA #define COLOR_YELLOW 0xFFFF00AA new TruckingJob[256]; new JobStatus[256]; new SweepingJob[256]; new PizzaJob[256]; public OnFilterScriptInit() { AddStaticVehicle(448,1883.3798,2069.7053,10.8203,179.2773,0,0); // Pizza 1 AddStaticVehicle(448,1881.6390,2069.7478,10.8203,179.2773,0,0); // Pizza 2 AddStaticVehicle(448,1880.7045,2069.7974,10.8203,179.2773,0,0); // Pizza 3 AddStaticVehicle(499,2117.5044,959.2747,11.1236,178.7323,0,0); // --Spawn1 AddStaticVehicle(499,2122.5000,959.2051,10.8009,179.3150,0,0); // --Spawn2 AddStaticVehicle(499,2123.2456,961.5412,10.8203,176.7116,0,0); // --Spawn3 AddStaticVehicle(574,1915.9480,964.5291,10.8203,160.7932,0,0); // Sweeper1 AddStaticVehicle(574,1911.3927,964.0528,10.8203,176.7733,0,0); // Sweeper2 AddStaticVehicle(574,1906.4396,964.7949,10.8203,182.4134,0,0); // Sweeper3 return 1; } public OnGameModeInit() { // Don't use these lines if it's a filterscript Create3DTextLabel("Pizza bike1 \n!",COLOR_DARKGOLD, 1883.3798,2069.7053,10.8203, 20, 0,1); // text label Create3DTextLabel("Pizza bike2 \n!",COLOR_DARKGOLD, 1881.6390,2069.7478,10.8203, 20, 0,1); // text label Create3DTextLabel("Pizza bike3 \n!",COLOR_DARKGOLD, 1880.7045,2069.7974,10.8203, 20, 0,1); // text label Create3DTextLabel("Courier1 \n!",COLOR_DARKGOLD,2118.2361,961.4190,10.8130, 20, 0,1); // text la Create3DTextLabel("Courier2 \n!",COLOR_DARKGOLD,1655.7910,-1820.5070,13.2732, 20, 0,1); // text la Create3DTextLabel("Courier3 \n!",COLOR_DARKGOLD,2123.2456,961.5412,10.8203, 20, 0,1); // text la Create3DTextLabel("/Sweeper1 \n",COLOR_DARKGOLD,1915.9480,964.5291,10.8203, 20, 0,1); // text la Create3DTextLabel("/Sweeper2 \n",COLOR_DARKGOLD,1911.3927,964.0528,10.8203, 20, 0,1); // text la Create3DTextLabel("/Sweeper3 \n",COLOR_DARKGOLD,1906.4396,964.7949,10.8203, 20, 0,1); // text la return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448) { SendClientMessage(playerid, COLOR_RED, "* You can start the pizza courier by using /pizza"); } return 1; { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499) { SendClientMessage(playerid, COLOR_RED, "* You can start the truck-mission with /truck"); } } return 1; } public OnPlayerEnterCheckpoint(playerid) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448) { if(PizzaJob[playerid] == 1){ PizzaJob[playerid] = 2; SetPlayerCheckpoint(playerid,2012.4771,-1640.1229,13.1431,10); SendClientMessage(playerid,COLOR_YELLOW,"* Please go to the next mark, and you'll be payed!"); return 1; } if(PizzaJob[playerid] == 2){ PizzaJob[playerid] = 3; SetPlayerCheckpoint(playerid,2387.0063,-1667.1498,13.1249,10); return 1; } if(PizzaJob[playerid] == 3){ PizzaJob[playerid] = 4; SetPlayerCheckpoint(playerid,2414.9255,-1649.6678,13.1305,10); return 1; } if(PizzaJob[playerid] == 4){ PizzaJob[playerid] = 5; SetPlayerCheckpoint(playerid,2517.6394,-1678.3141,13.9862,10); return 1; } if(PizzaJob[playerid] == 5){ PizzaJob[playerid] = 6; SetPlayerCheckpoint(playerid,2441.1526,-2017.4093,13.1231,10); return 1; } if(PizzaJob[playerid] == 6){ PizzaJob[playerid] = 7; SetPlayerCheckpoint(playerid,2486.2058,-2017.6384,13.1309,10); return 1; } if(PizzaJob[playerid] == 7){ PizzaJob[playerid] = 8; SetPlayerCheckpoint(playerid,2520.9238,-2016.4714,13.1395,10); return 1; } if(PizzaJob[playerid] == 8){ PizzaJob[playerid] = 9; SetPlayerCheckpoint(playerid,2464.7258,-2000.3944,13.1430,10); return 1; } if(PizzaJob[playerid] == 9){ PizzaJob[playerid] = 10; SetPlayerCheckpoint(playerid,2240.8374,-1886.9504,13.1486,10); return 1; } if(PizzaJob[playerid] == 10){ PizzaJob[playerid] = 11; SetPlayerCheckpoint(playerid,2095.5488,-1815.7517,12.9792,10); return 1; } if(PizzaJob[playerid] == 11){ PizzaJob[playerid] = 0; DisablePlayerCheckpoint(playerid); SendClientMessage(playerid,COLOR_YELLOW,"* You have recieved $400 for delivering the pizzas."); GivePlayerMoney(playerid,400); } } return 1; { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499) { if(JobStatus[playerid] == 1){ JobStatus[playerid] = 2; SetPlayerCheckpoint(playerid,2452.3928,-2570.7349,14.0369,10); SendClientMessage(playerid,COLOR_YELLOW,"* Please go to the next mark, and you'll be payed!"); }else{ JobStatus[playerid] = 1; GivePlayerMoney(playerid,400); SendClientMessage(playerid,COLOR_YELLOW,"* You have finished the job!"); TruckingJob[playerid] = 0; DisablePlayerCheckpoint(playerid); } } } return 1; { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574) { SendClientMessage(playerid, COLOR_RED, "* You can start the sweepingjob by using /sweeper"); } } return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { if(PizzaJob[playerid] > 0) { PizzaJob[playerid] = 0; SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed."); DisablePlayerCheckpoint(playerid); } return 1; { if(TruckingJob[playerid] == 1) { TruckingJob[playerid] = 0; SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed."); DisablePlayerCheckpoint(playerid); } } return 1; { if(SweepingJob[playerid] == 1) { SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed."); SweepingJob[playerid] = 0; } } return 1; } // LOLS forward SweeperJobFinish(playerid); public SweeperJobFinish(playerid) { if(SweepingJob[playerid] == 0){ return 1; } GivePlayerMoney(playerid,200); SendClientMessage(playerid,COLOR_YELLOW,"* You have been payed for your job! - $200"); SweepingJob[playerid] = 0; return 1; } // COMMANDS YCMD:pizza(playerid,params[],help) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448) { PizzaJob[playerid] = 1; new name[MAX_PLAYER_NAME], string[48]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "* %s is now a Pizzaboy.", name ); SendClientMessageToAll(COLOR_YELLOW, string); SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10); SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!"); return 1; { YCMD:sweeper(playerid,params[],help) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574) { SweepingJob[playerid] = 1; new name[MAX_PLAYER_NAME], string[48]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "* %s is now a StreetSweeper.", name ); SendClientMessageToAll(COLOR_YELLOW, string); SendClientMessage(playerid,COLOR_YELLOW,"* Clean the street for 1 minute and recieve $200"); SetTimerEx("SweeperJobFinish", 60000, false, "i", playerid); return 1; } SendClientMessage(playerid, COLOR_RED,"You have to be in a streetsweeper to start the job"); } return 1; { YCMD:courier(playerid,params[],help) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499) { JobStatus[playerid] = 1; TruckingJob[playerid] = 1; SetPlayerCheckpoint(playerid,1110.5992,-1327.9216,13.7145,10); new name[MAX_PLAYER_NAME], string[48]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "* %s is now a Courier.", name ); SendClientMessageToAll(COLOR_YELLOW, string); return 1; } SendClientMessage(playerid, COLOR_RED,"You have to be in a courier truck to start the job"); return 1; } }
Код:
C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(42) : warning 217: loose indentation C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(51) : warning 225: unreachable code C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(122) : warning 225: unreachable code C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(139) : warning 217: loose indentation C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(140) : warning 225: unreachable code C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(146) : warning 217: loose indentation C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(156) : warning 217: loose indentation C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(157) : warning 225: unreachable code C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(167) : warning 225: unreachable code C:\DOCUME~1\MOSTWA~1\Desktop\SAMP03~1\FILTER~1\limofao.pwn(189) : warning 203: symbol is never used: "pizza" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 10 Warnings.