(2)and now i know what the wrong with garhouse system the sscanf didn't load and it now work but i have problem in the dialog and no one answer plz change this fs and make it without dialog plz
pawn Код:
//Funny Player Bones iTs My First Filter Script
#include <a_samp>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define TEAM_CIVILIAN 1
#define TEAM_TAXI 2
#define TEAM_POLICE 3
#define TEAM_SERVISE 4
#define TEAM_AMBULANCE 5
#define TEAM_GUARD 6
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
new HarvestJob[256];
new PizzaJob[256];
new SweepingJob[256];
new PetrolJob[256];
new TruckingJob[256];
new JobStatus[256];
forward Money();
forward SweeperJobFinish(playerid);
new gTeam[MAX_PLAYERS];
new name[MAX_PLAYER_NAME];
new money;
#if defined FILTERSCRIPT
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
new tmp[256];
new cmd[256];
new string[256];
new giveplayerid, idx;
giveplayerid = strval(tmp);
//Another Jobs
if (strcmp("/takejob", cmdtext, true, 10) == 0)
{
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;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403)
{
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ SendClientMessage(playerid,COLOR_RED,"* You don't have a trailer attached to the vehicle!"); return 1; }
if(PetrolJob[playerid] != 1 && PetrolJob[playerid] != 2 && PetrolJob[playerid] != 3){ PetrolJob[playerid] = 1; }
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s is now a Petrol Trucker.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
if(PetrolJob[playerid] == 1){
SetPlayerCheckpoint(playerid,1944.7424,-1771.1267,13.1157,10);
return 1;
}
if(PetrolJob[playerid] == 2){
SetPlayerCheckpoint(playerid,1003.4263,-941.8485,41.8079,10);
return 1;
}
if(PetrolJob[playerid] == 3){
SetPlayerCheckpoint(playerid,-97.8173,-1166.7585,2.2650,10);
return 1;
}
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
HarvestJob[playerid] = 1;
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s is now a Harvester.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerCheckpoint(playerid,-484.5330,-1480.2612,13.9457,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
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;
}
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 job vehicle to start the job");
return 1;
}
if (strcmp("/Jobs", cmdtext, true) == 0)
{
ShowPlayerDialog(playerid,9999,DIALOG_STYLE_LIST,"Jobs","\nTrucker 1 \nTaxi 2 \nPolice 3 \ncarservice 4 \nambulance 5 \nguarde 6","Select","I Don't Wanna Job");
return 1;
}
if(strcmp(cmdtext, "/quitjob", true) == 0)
{
if(gTeam[playerid] == TEAM_TAXI || gTeam[playerid] == TEAM_POLICE || gTeam[playerid] == TEAM_SERVISE || gTeam[playerid] == TEAM_AMBULANCE || gTeam[playerid] == TEAM_GUARD)
{
gTeam[playerid] = TEAM_CIVILIAN;
} else {
SendClientMessage(playerid, COLOR_RED, "You Don't Have a JoB!");
}
return 1;
}
if(strcmp(cmd, "/jobcmds", true) == 0)
{
SendClientMessage(playerid, COLOR_RED, "----Commands----:");
if(gTeam[playerid] == TEAM_POLICE)
{
SendClientMessage(playerid, COLOR_YELLOW, "Police Commands:");
SendClientMessage(playerid, COLOR_YELLOW, "/sokkol <ID>, /prison <ID>, /unprison <ID> /setwantedlevel");
}
else if(gTeam[playerid] == TEAM_SERVISE)
{
SendClientMessage(playerid, COLOR_YELLOW, "Assistance Commands:");
SendClientMessage(playerid, COLOR_YELLOW, "/repair <ID>");
}
else if(gTeam[playerid] == TEAM_AMBULANCE)
{
SendClientMessage(playerid, COLOR_YELLOW, "Ambulance Commands:");
SendClientMessage(playerid, COLOR_YELLOW, "/heal <ID>");
}
else if(gTeam[playerid] == TEAM_AMBULANCE)
{
SendClientMessage(playerid, COLOR_YELLOW, "Guard Commands:");
SendClientMessage(playerid, COLOR_YELLOW, "/guard <ID>");
}
else if(gTeam[playerid] == TEAM_CIVILIAN)
{
SendClientMessage(playerid, COLOR_YELLOW, "You Don't Have a JoB!");
}
return 1;
}
//Rendхrsйgi parancsok------------------------------------------------------
new jailed[MAX_PLAYERS];
if(strcmp(cmd, "/sokkol", true) == 0)
{
if(gTeam[playerid] == TEAM_POLICE)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "[HELP]: /sokkol <ID>");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
} else {
if(IsPlayerConnected(giveplayerid))
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "%s Freezed!", name);
SendClientMessage(giveplayerid, COLOR_RED, string);
new Float:Health;
SetPlayerHealth(playerid, GetPlayerHealth(playerid, Health) -50);
SendClientMessage(playerid, COLOR_GREEN, "Good Freeze!");
} else {
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"You're not a Police!");
}
return 1;
}
if(strcmp(cmd, "/prison", true) == 0)
{
if(gTeam[playerid] == TEAM_POLICE)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "[HELP]: /prison <ID>");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
} else {
if(IsPlayerConnected(giveplayerid))
{
if (jailed[giveplayerid] == 0)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "%s Jailed You!", name);
SendClientMessage(giveplayerid, COLOR_RED, string);
new string2[256];
new name2[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, name2, sizeof (name2));
format(string2, sizeof(string2), "Officer %s Jailed %s!", name, name2);
SendClientMessageToAll(COLOR_RED, string2);
SetPlayerInterior(giveplayerid, 6);
SetPlayerPos(giveplayerid, 264.3591,77.5832,1001.0391);
SetCameraBehindPlayer(giveplayerid);
ResetPlayerWeapons(giveplayerid);
ResetPlayerMoney(giveplayerid);
jailed[giveplayerid] = 1;
SendClientMessage(playerid, COLOR_GREEN, "Good Jail!");
} else {
SendClientMessage(playerid, COLOR_RED, "Player now in Jail!");
}
} else {
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"You're Not a Police!");
}
return 1;
}
if(strcmp(cmd, "/unprison", true) == 0)
{
if(gTeam[playerid] == TEAM_POLICE)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "[Help]: /unjail <ID>");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
} else {
if(IsPlayerConnected(giveplayerid))
{
if (jailed[giveplayerid] == 1)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "%s Unjailed You!", name);
SendClientMessage(giveplayerid, COLOR_RED, string);
new string2[256];
new name2[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, name2, sizeof (name2));
format(string2, sizeof(string2), "Officer %s Unjailed %s-t!", name, name2);
SendClientMessageToAll(COLOR_RED, string2);
SetPlayerInterior(giveplayerid, 0);
SetPlayerPos(giveplayerid,1546.1195,-1675.4786,13.5617);
SetCameraBehindPlayer(giveplayerid);
ResetPlayerWeapons(giveplayerid);
jailed[giveplayerid] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Good Unjail!");
} else {
SendClientMessage(playerid, COLOR_RED, "Player Unjailet at the moment!");
}
} else {
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"You're Not a Police!");
}
return 1;
}
if (strcmp(cmdtext, "/setwantedlevel", true) == 0)
{
SendClientMessage(playerid, 0x33CCFFAA, "Usage /setwantedlevel[0-6]");
return 1;
}
if (strcmp(cmdtext, "/setwantedlevel0", true) == 0)
{
SetPlayerWantedLevel(playerid, 0);
SendClientMessage(playerid, 0x33CCFFAA, "You Don't Have Star Now !");
return 1;
}
if (strcmp(cmdtext, "/Setwantedlevel1", true) == 0)
{
SetPlayerWantedLevel(playerid, 1);
SendClientMessage(playerid, 0x33CCFFAA, "Your stars are now 1 !");
return 1;
}
if (strcmp(cmdtext, "/Setwantedlevel2", true) == 0)
{
SetPlayerWantedLevel(playerid, 2);
SendClientMessage(playerid, 0x33CCFFAA, "Your stars are now 2 !");
return 1;
}
if (strcmp(cmdtext, "/Setwantedlevel3", true) == 0)
{
SetPlayerWantedLevel(playerid, 3);
SendClientMessage(playerid, 0x33CCFFAA, "Your stars are now 3 !");
return 1;
}
if (strcmp(cmdtext, "/Setwantedlevel4", true) == 0)
{
SetPlayerWantedLevel(playerid, 4);
SendClientMessage(playerid, 0x33CCFFAA, "Your stars are now 4 !");
return 1;
}
if (strcmp(cmdtext, "/Setwantedlevel5", true) == 0)
{
SetPlayerWantedLevel(playerid, 5);
SendClientMessage(playerid, 0x33CCFFAA, "Your stars are now 5 !");
return 1;
}
if (strcmp(cmdtext, "/Setwantedlevel6", true) == 0)
{
SetPlayerWantedLevel(playerid, 6);
SendClientMessage(playerid, 0x33CCFFAA, "Your stars are now 6 !");
return 1;
}
//Autуszerelх parancsok
new vehicleid = GetPlayerVehicleID(giveplayerid);
if(strcmp(cmd, "/repair", true) == 0)
{
if(gTeam[playerid] == TEAM_SERVISE)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "[HELP]: /repair <ID>");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
} else {
if(IsPlayerConnected(giveplayerid))
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "%s Repaired You're Car!", name);
SendClientMessage(giveplayerid, COLOR_RED, string);
SetVehicleHealth(vehicleid, 1000);
GivePlayerMoney(giveplayerid, -50);
GivePlayerMoney(playerid, 50);
SendClientMessage(playerid, COLOR_GREEN, "Good Repair!");
} else {
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"You're not an assistance!");
}
return 1;
}
//Mentхs parancsok
if(strcmp(cmd, "/heal", true) == 0)
{
if(gTeam[playerid] == TEAM_AMBULANCE)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "[HELP]: /heal <ID>");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
} else {
if(IsPlayerConnected(giveplayerid))
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "%s Healed You!", name);
SendClientMessage(giveplayerid, COLOR_RED, string);
SetPlayerHealth(giveplayerid, 100);
GivePlayerMoney(giveplayerid, -100);
GivePlayerMoney(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN, "Healed!");
} else {
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"You're Not an Ambulance!");
}
return 1;
}
//Testхr parancsok
if(strcmp(cmd, "/guard", true) == 0)
{
if(gTeam[playerid] == TEAM_AMBULANCE)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "[HELP]: /guard <ID>");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
} else {
if(IsPlayerConnected(giveplayerid))
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "%s You're Guard!", name);
SendClientMessage(giveplayerid, COLOR_RED, string);
GivePlayerMoney(giveplayerid, -1000);
GivePlayerMoney(playerid, 1000);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 23, 1000);
GivePlayerWeapon(playerid, 31, 10000);
SendClientMessage(playerid, COLOR_GREEN, "Gratz!");
} else {
SendClientMessage(playerid, COLOR_RED, "[ERROR]:Wrong ID!");
}
}
} else {
SendClientMessage(playerid,COLOR_RED,"You're not a Guard!");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 9999)
{
if(response)
{
if(listitem == 0)//funny bone 1
{
if(gTeam[playerid] == TEAM_CIVILIAN)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "Trucker, %s working!", name);
SendClientMessageToAll(COLOR_GREEN, string);
gTeam[playerid] = TEAM_TAXI;
} else {
SendClientMessage(playerid, COLOR_RED, "First quit Job! (/quitjob)");
}
if(listitem == 1)//funny bone 2
{
SetPlayerPos(playerid,1795.5988,-1898.8351,13.4007,194.8652);
if(gTeam[playerid] == TEAM_CIVILIAN)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "Taxi Driver, %s working!", name);
SendClientMessageToAll(COLOR_GREEN, string);
gTeam[playerid] = TEAM_TAXI;
} else {
SendClientMessage(playerid, COLOR_RED, "First quit Job! (/quitjob)");
}
if(listitem == 2)//funny bone 3
{
SetPlayerPos(playerid,1543.4366,-1680.9292,13.5565,330.0805);
if(gTeam[playerid] == TEAM_CIVILIAN)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "Police, %s Wroking!", name);
SendClientMessageToAll(COLOR_GREEN, string);
SetPlayerArmour(playerid, 100);
gTeam[playerid] = TEAM_POLICE;
} else {
SendClientMessage(playerid, COLOR_RED, "First quit Job! (/quitjob)");
}
if(listitem == 3)//funny bone 4
{
if(gTeam[playerid] == TEAM_CIVILIAN)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "Assistance, %s Working!", name);
SendClientMessageToAll(COLOR_GREEN, string);
gTeam[playerid] = TEAM_SERVISE;
} else {
SendClientMessage(playerid, COLOR_RED, "First quit Job! (/quitjob)");
}
if(listitem == 4)//funny bone 5
{
SetPlayerPos(playerid,1181.6617,-1325.0562,13.5839,264.9981);
if(gTeam[playerid] == TEAM_CIVILIAN)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "Ambulance, %s Working!", name);
SendClientMessageToAll(COLOR_GREEN, string);
SetPlayerHealth(playerid, 100);
gTeam[playerid] = TEAM_AMBULANCE;
} else {
SendClientMessage(playerid, COLOR_RED, "First quit Job! (/quitjob)");
}
if(listitem == 5)//funny bone 6
{
if(gTeam[playerid] == TEAM_CIVILIAN)
{
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "Guard, %s working!", name);
SendClientMessageToAll(COLOR_GREEN, string);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
gTeam[playerid] = TEAM_GUARD;
} else {
SendClientMessage(playerid, COLOR_RED, "First quit Job! (/quitjob)");
}
}
}
return 1;
}
#endif
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0 || classid == 1)
{
gTeam[playerid] = TEAM_CIVILIAN;
}
}
public Money()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_TAXI || gTeam[i] == TEAM_POLICE || gTeam[i] == TEAM_SERVISE || TEAM_AMBULANCE || TEAM_GUARD)
{
}
}
}
public OnPlayerDeath(playerid)
{
gTeam[playerid] = TEAM_CIVILIAN;
SendClientMessage(playerid, COLOR_RED, "You're Dead! ");
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER){
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
SendClientMessage(playerid, COLOR_RED, "* You can start the sweepingjob by using /takejob");
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
{
SendClientMessage(playerid, COLOR_RED, "* You can start the pizza courier by using /takejob");
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
{
SendClientMessage(playerid, COLOR_RED, "* You can start the sweepingjob by using /takejob");
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403)
{
SendClientMessage(playerid, COLOR_RED, "* You can start the Petrol Trucking by typing /takejob");
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499)
{
SendClientMessage(playerid, COLOR_RED, "* You can start the courier with /takejob");
}
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
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);
}
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403)
{
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ SendClientMessage(playerid,COLOR_RED,"* You don't have a trailer attached to the vehicle!"); DisablePlayerCheckpoint(playerid); return 1; }
GivePlayerMoney(playerid,500);
SendClientMessage(playerid,COLOR_YELLOW,"* You have earned $500!");
DisablePlayerCheckpoint(playerid);
PetrolJob[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 follow the marks on your map, 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);
}
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532){
if(HarvestJob[playerid] == 1){
HarvestJob[playerid] = 2;
SetPlayerCheckpoint(playerid,-488.9691,-1454.4095,13.6985,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Please follow the marks on your map, and you'll be payed!");
return 1;
}
if(HarvestJob[playerid] == 2){
HarvestJob[playerid] = 3;
SetPlayerCheckpoint(playerid,-491.1559,-1590.0781,6.0986,10);
return 1;
}
if(HarvestJob[playerid] == 3){
HarvestJob[playerid] = 4;
SetPlayerCheckpoint(playerid,-517.1489,-1494.8715,10.6554,10);
return 1;
}
if(HarvestJob[playerid] == 4){
HarvestJob[playerid] = 5;
SetPlayerCheckpoint(playerid,-537.1957,-1495.2427,9.5398,10);
return 1;
}
if(HarvestJob[playerid] == 5){
HarvestJob[playerid] = 6;
SetPlayerCheckpoint(playerid,-538.4468,-1594.6807,7.9598,10);
return 1;
}
if(HarvestJob[playerid] == 6){
HarvestJob[playerid] = 7;
SetPlayerCheckpoint(playerid,-562.2611,-1505.3055,8.7389,10);
return 1;
}
if(HarvestJob[playerid] == 7){
HarvestJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,COLOR_YELLOW,"* You have recieved $300 for your work!");
GivePlayerMoney(playerid,300);
}
}
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(HarvestJob[playerid] > 0)
{
SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed.");
DisablePlayerCheckpoint(playerid);
HarvestJob[playerid] = 0;
}
if(PizzaJob[playerid] > 0)
{
PizzaJob[playerid] = 0;
SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed.");
DisablePlayerCheckpoint(playerid);
}
if(SweepingJob[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed.");
SweepingJob[playerid] = 0;
}
if(PetrolJob[playerid] > 0)
{
SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed.");
DisablePlayerCheckpoint(playerid);
}
if(TruckingJob[playerid] == 1)
{
TruckingJob[playerid] = 0;
SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed.");
DisablePlayerCheckpoint(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;
}
public OnFilterScriptInit()
{
AddStaticVehicle(532,-488.9691,-1454.4095,13.6985,176.1319,0,0); // Harvest
AddStaticVehicle(448,2122.1677,-1784.2250,12.9837,180.4585,0,0); // Pizza 1
AddStaticVehicle(448,2121.9895,-1784.7623,12.9867,181.5936,0,0); // Pizza 1
AddStaticVehicle(448,2118.8469,-1784.5692,12.9880,181.5090,0,0); // Pizza 2
AddStaticVehicle(448,2115.7837,-1784.6464,12.9860,181.6605,0,0); // Pizza 3
AddStaticVehicle(574,1424.8956,-1844.7279,13.2739,359.7335,0,0); // Sweeper1
AddStaticVehicle(574,1428.4050,-1844.6340,13.2739,0.7382,0,0); // Sweeper2
AddStaticVehicle(574,1431.9050,-1844.6138,13.2739,1.4491,0,0); // Sweeper3
AddStaticVehicle(403,2057.3081,-1939.9397,13.9432,270.4501,0,0); // Petrol Trucker (Spawn Front)
AddStaticVehicle(584,2045.2939,-1939.9041,13.0633,268.2366,0,0); // Petrol Trucker (Spawn Back)
AddStaticVehicle(403,2032.4635,-1939.7537,13.9389,271.0817,0,0); // Petrol Trucker (Spawn Front)
AddStaticVehicle(584,2020.9797,-1940.1196,13.9476,270.5276,0,0); // Petrol Trucker (Spawn Back)
AddStaticVehicle(499,1655.1216,-1806.7058,13.2722,89.1432,0,0); // --Spawn1
AddStaticVehicle(499,1655.7910,-1820.5070,13.2732,89.5607,0,0); // --Spawn2
AddStaticVehicle(499,1654.5166,-1837.5059,13.2737,90.1605,0,0); // --Spawn3
AddStaticVehicle(499,1599.0535,-1791.3358,13.0810,271.2589,0,0); // --Spawn4
AddStaticVehicle(499,1603.0015,-1824.4679,13.1864,270.6521,0,0); // --Spawn5
AddStaticVehicle(499,1602.8961,-1837.0936,13.2257,270.2492,0,0); // --Spawn6
}
//enjoy
add string on lines tajt you have error ..."string" and for warnings: loose indentitaion, ad on top of script #pragma tabsize 0 or all that lines align