3 Job's Help me ! -
yaron0600 - 31.12.2012
Hey , I just want to add every time at job done once you get 10,000$ , Can u add it without any error's ? In that three job's here ? HotDog , Pilot , Cimbone ?
HotDog :
Код:
#include <a_samp>
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define HotPoint1 2009.0814,-1728.1830,13.4533
#define HotPoint2 2009.0692,-1640.7626,13.4465
#define HotPoint3 2075.3311,-1643.5902,13.4073
#define HotPoint4 2138.3816,-1616.8345,13.4692
#define HotPoint5 2172.3430,-1675.6588,14.9697
#define HotPoint6 2308.7888,-1665.8096,14.3982
#define HotPoint7 2503.9426,-1658.8201,13.3568
#define HotPoint8 2376.7712,-1907.2572,13.2880
#define HotPoint9 2238.4990,-1902.2578,13.4472
#define HotPoint10 1131.9427,-2037.3005,68.9129
#define HotPoint11 1623.0204,-1858.5880,13.4557
#define Refillpoint 1618.9200,-1892.1852,13.4540
new hotdog = 0;
new hotinfo;
public OnFilterScriptInit()
{
AddStaticVehicle(588,1647.9491,-1890.8440,13.4599,1.1164,1,1); // dog1
AddStaticVehicle(588,1653.8723,-1886.4052,13.4567,359.2593,1,1); // dog2
AddStaticVehicle(588,1658.9525,-1886.4708,13.4531,359.2592,1,1); // dog3
AddStaticVehicle(588,1664.5953,-1886.5439,13.4496,359.2583,1,1); // dog4
hotinfo = CreatePickup(1239,1,1671.2996,-1881.1387,13.5448,-1);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hotdog", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
{
hotdog = 1;
SetPlayerCheckpoint(playerid, HotPoint1, 3.0);
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now a HotDog seller.", name );
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a hotdog van to start the job");
}
if (strcmp("/hotdoginfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the hotdogs to people's house.");
SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter a hotdog van, type /hotdog and red markers will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the markers and get you're reward!");
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint1))
{
SetPlayerCheckpoint(playerid, HotPoint2, 7.0);
GameTextForPlayer(playerid, "~g~1 House done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint2))
{
SetPlayerCheckpoint(playerid, HotPoint3, 7.0);
GameTextForPlayer(playerid, "~g~2 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint3))
{
SetPlayerCheckpoint(playerid, HotPoint4, 7.0);
GameTextForPlayer(playerid, "~g~3 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint4))
{
SetPlayerCheckpoint(playerid, HotPoint5, 7.0);
GameTextForPlayer(playerid, "~g~4 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint5))
{
SetPlayerCheckpoint(playerid, Refillpoint, 7.0);
GameTextForPlayer(playerid, "~g~5 Houses done, refill your hotdogs at the marker!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Refillpoint))
{
SetPlayerCheckpoint(playerid, HotPoint6, 7.0);
GameTextForPlayer(playerid, "~g~Hotdogs refilled!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint6))
{
SetPlayerCheckpoint(playerid, HotPoint7, 7.0);
GameTextForPlayer(playerid, "~g~6 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint7))
{
SetPlayerCheckpoint(playerid, HotPoint8, 7.0);
GameTextForPlayer(playerid, "~g~7 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint8))
{
SetPlayerCheckpoint(playerid, HotPoint9, 7.0);
GameTextForPlayer(playerid, "~g~8 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint9))
{
SetPlayerCheckpoint(playerid, HotPoint10, 7.0);
GameTextForPlayer(playerid, "~g~9 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint10))
{
SetPlayerCheckpoint(playerid, HotPoint11, 7.0);
GameTextForPlayer(playerid, "~g~10 Houses done, get back to the startpoint!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint11))
{
GivePlayerMoney(playerid, 800);
GameTextForPlayer(playerid, "~g~You collected a total of $800,-!", 3000, 3);
new veh;
veh = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(veh);
DisablePlayerCheckpoint(playerid);
hotdog = 0;
}
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
{
SendClientMessage(playerid, COLOR_RED, "You can start the hotdog-mission with /hotdog");
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((hotdog) == 1)
{
hotdog = 0;
SendClientMessage(playerid, COLOR_RED, "You left your hotdog van behind, get in again if you want to continue your job.");
}else if((hotdog) == 0){
//Nothing
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
hotdog = 0;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == hotinfo)
{
GameTextForPlayer(playerid, "~g~Welcome at the Hot dog job, use /hotdoginfo to know more", 3000, 3);
}
}
Pilot :
Код:
#include <a_samp>
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define Checkpoint1 -1253.9714,238.6661,14.1484
#define Checkpoint2 1855.2505,-2494.0652,13.5547
new flyjobrunning = 0;
new info;
public OnFilterScriptInit()
{
AddStaticVehicle(519,1729.8932,-2415.7798,14.4727,149.2040,1,1); //
info = CreatePickup(1239,1,1748.7014,-2421.0500,13.5547,-1);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/startflight", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
flyjobrunning = 1;
SetPlayerCheckpoint(playerid, Checkpoint1, 3.0);
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
flyjobrunning = 1;
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now delivering goods with a plane.", name );
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in the jobplane to start the job");
}
if (strcmp("/flyinfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the planeload to the airport in San Fierro.");
SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /startflight and a red marker will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just fly to the marker and you're done.");
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint1))
{
SetPlayerCheckpoint(playerid, Checkpoint2, 7.0);
GameTextForPlayer(playerid, "~g~Now fly back to Los Santos Airport to collect your paycheck.", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint2))
{
GivePlayerMoney(playerid, 1000);
GameTextForPlayer(playerid, "~g~You Completed the job, well done!", 3000, 3);
SetVehicleToRespawn(1);
DisablePlayerCheckpoint(playerid);
flyjobrunning = 0;
}
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
SendClientMessage(playerid, COLOR_RED, "You can start the Fly job with /startflight");
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((flyjobrunning) == 1)
{
flyjobrunning = 0;
SendClientMessage(playerid, COLOR_RED, "You left the plane, you failed the job.");
}else if((flyjobrunning) == 0){
//Nothing
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
flyjobrunning = 0;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == info)
{
GameTextForPlayer(playerid, "~g~Welcome at the Fly job, use /flyinfo to know more", 3000, 3);
}
}
Cambione Job :
Код:
#include <a_samp>
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define Checkpoint1 -256.0010,-1542.3809,3.9930
#define Checkpoint2 -231.8289,-1467.9810,4.9421
#define Checkpoint3 -193.9747,-1375.2502,4.7856
#define Checkpoint4 -246.0348,-1326.1063,8.9300
#define Checkpoint5 -407.1459,-1371.5518,23.6588
#define Checkpoint6 -564.7697,-1302.4977,22.5511
#define Checkpoint7 -569.0633,-1508.3352,9.1518
new combinejobrunning = 0;
new info;
forward GivePlayerOneExp(playerid);
public OnFilterScriptInit()
{
AddStaticVehicleEx(532,-370.1018,-1463.1403,26.6953,287.0754,0,0,10); // combine 1
AddStaticVehicleEx(532,-364.2571,-1479.7140,26.7041,285.6486,0,0,10); // combine 2
AddStaticVehicleEx(532,-361.6030,-1501.2618,24.8698,285.8201,0,0,10); // combine 3
info = CreatePickup(1239,1,-366.1941,-1440.3253,25.7266,-1);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/combine", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
SetPlayerCheckpoint(playerid, Checkpoint1, 3.0);
CreateObject(823,-256.0010,-1542.3809,3.9930,0,0,0);
combinejobrunning = 1;
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now doing the Combine job.", name );
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a Combine to start the job");
}
if (strcmp("/combineinfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need the harvest the weed.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter the combine, type /combine and a red marker will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the markers and you're done.");
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint1))
{
SetPlayerCheckpoint(playerid, Checkpoint2, 7.0);
CreateObject(823,-231.8289,-1467.9810,4.9421,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint2))
{
SetPlayerCheckpoint(playerid, Checkpoint3, 7.0);
CreateObject(823,-193.9747,-1375.2502,4.7856,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint3))
{
SetPlayerCheckpoint(playerid, Checkpoint4, 7.0);
CreateObject(823,-246.0348,-1326.1063,8.9300,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint4))
{
SetPlayerCheckpoint(playerid, Checkpoint5, 7.0);
CreateObject(823,-407.1459,-1371.5518,23.6588,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint5))
{
SetPlayerCheckpoint(playerid, Checkpoint6, 7.0);
CreateObject(823,-564.7697,-1302.4977,22.5511,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint6))
{
SetPlayerCheckpoint(playerid, Checkpoint7, 7.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint7))
{
GivePlayerMoney(playerid, 200);
GameTextForPlayer(playerid, "~g~You Completed the job, well done!", 3000, 3);
SetVehicleToRespawn(2);
DisablePlayerCheckpoint(playerid);
combinejobrunning = 0;
}
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
SendClientMessage(playerid, COLOR_RED, "You can start the combine-job with /combine");
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((combinejobrunning) == 1)
{
combinejobrunning = 0;
SendClientMessage(playerid, COLOR_RED, "You left your combine behind, get in again if you want to continue your job.");
}else if((combinejobrunning) == 0){
//Nothing
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
combinejobrunning = 0;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == info)
{
GameTextForPlayer(playerid, "~g~Welcome to the Combine job, use /combineinfo for info about the job", 3000, 3);
}
}
Re : 3 Job's Help me ! -
DaRk_RaiN - 31.12.2012
pawn Код:
#include <a_samp>
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define HotPoint1 2009.0814,-1728.1830,13.4533
#define HotPoint2 2009.0692,-1640.7626,13.4465
#define HotPoint3 2075.3311,-1643.5902,13.4073
#define HotPoint4 2138.3816,-1616.8345,13.4692
#define HotPoint5 2172.3430,-1675.6588,14.9697
#define HotPoint6 2308.7888,-1665.8096,14.3982
#define HotPoint7 2503.9426,-1658.8201,13.3568
#define HotPoint8 2376.7712,-1907.2572,13.2880
#define HotPoint9 2238.4990,-1902.2578,13.4472
#define HotPoint10 1131.9427,-2037.3005,68.9129
#define HotPoint11 1623.0204,-1858.5880,13.4557
#define Refillpoint 1618.9200,-1892.1852,13.4540
new hotdog = 0;
new hotinfo;
public OnFilterScriptInit()
{
AddStaticVehicle(588,1647.9491,-1890.8440,13.4599,1.1164,1,1); // dog1
AddStaticVehicle(588,1653.8723,-1886.4052,13.4567,359.2593,1,1); // dog2
AddStaticVehicle(588,1658.9525,-1886.4708,13.4531,359.2592,1,1); // dog3
AddStaticVehicle(588,1664.5953,-1886.5439,13.4496,359.2583,1,1); // dog4
hotinfo = CreatePickup(1239,1,1671.2996,-1881.1387,13.5448,-1);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hotdog", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
{
hotdog = 1;
SetPlayerCheckpoint(playerid, HotPoint1, 3.0);
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now a HotDog seller.", name );
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a hotdog van to start the job");
}
if (strcmp("/hotdoginfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the hotdogs to people's house.");
SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter a hotdog van, type /hotdog and red markers will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the markers and get you're reward!");
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint1))
{
SetPlayerCheckpoint(playerid, HotPoint2, 7.0);
GameTextForPlayer(playerid, "~g~1 House done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint2))
{
SetPlayerCheckpoint(playerid, HotPoint3, 7.0);
GameTextForPlayer(playerid, "~g~2 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint3))
{
SetPlayerCheckpoint(playerid, HotPoint4, 7.0);
GameTextForPlayer(playerid, "~g~3 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint4))
{
SetPlayerCheckpoint(playerid, HotPoint5, 7.0);
GameTextForPlayer(playerid, "~g~4 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint5))
{
SetPlayerCheckpoint(playerid, Refillpoint, 7.0);
GameTextForPlayer(playerid, "~g~5 Houses done, refill your hotdogs at the marker!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Refillpoint))
{
SetPlayerCheckpoint(playerid, HotPoint6, 7.0);
GameTextForPlayer(playerid, "~g~Hotdogs refilled!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint6))
{
SetPlayerCheckpoint(playerid, HotPoint7, 7.0);
GameTextForPlayer(playerid, "~g~6 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint7))
{
SetPlayerCheckpoint(playerid, HotPoint8, 7.0);
GameTextForPlayer(playerid, "~g~7 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint8))
{
SetPlayerCheckpoint(playerid, HotPoint9, 7.0);
GameTextForPlayer(playerid, "~g~8 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint9))
{
SetPlayerCheckpoint(playerid, HotPoint10, 7.0);
GameTextForPlayer(playerid, "~g~9 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint10))
{
SetPlayerCheckpoint(playerid, HotPoint11, 7.0);
GameTextForPlayer(playerid, "~g~10 Houses done, get back to the startpoint!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint11))
{
GivePlayerMoney(playerid,10000);
GameTextForPlayer(playerid, "~g~You collected a total of $10000,-!", 3000, 3);
new veh;
veh = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(veh);
DisablePlayerCheckpoint(playerid);
hotdog = 0;
}
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
{
SendClientMessage(playerid, COLOR_RED, "You can start the hotdog-mission with /hotdog");
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((hotdog) == 1)
{
hotdog = 0;
SendClientMessage(playerid, COLOR_RED, "You left your hotdog van behind, get in again if you want to continue your job.");
}else if((hotdog) == 0){
//Nothing
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
hotdog = 0;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == hotinfo)
{
GameTextForPlayer(playerid, "~g~Welcome at the Hot dog job, use /hotdoginfo to know more", 3000, 3);
}
}
pawn Код:
#include <a_samp>
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define Checkpoint1 -1253.9714,238.6661,14.1484
#define Checkpoint2 1855.2505,-2494.0652,13.5547
new flyjobrunning = 0;
new info;
public OnFilterScriptInit()
{
AddStaticVehicle(519,1729.8932,-2415.7798,14.4727,149.2040,1,1); //
info = CreatePickup(1239,1,1748.7014,-2421.0500,13.5547,-1);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/startflight", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
flyjobrunning = 1;
SetPlayerCheckpoint(playerid, Checkpoint1, 3.0);
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
flyjobrunning = 1;
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now delivering goods with a plane.", name );
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in the jobplane to start the job");
}
if (strcmp("/flyinfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the planeload to the airport in San Fierro.");
SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /startflight and a red marker will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just fly to the marker and you're done.");
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint1))
{
SetPlayerCheckpoint(playerid, Checkpoint2, 7.0);
GameTextForPlayer(playerid, "~g~Now fly back to Los Santos Airport to collect your paycheck.", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint2))
{
GivePlayerMoney(playerid, 1000);
GameTextForPlayer(playerid, "~g~You Completed the job, well done!", 3000, 3);
SetVehicleToRespawn(1);
DisablePlayerCheckpoint(playerid);
flyjobrunning = 0;
}
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
SendClientMessage(playerid, COLOR_RED, "You can start the Fly job with /startflight");
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((flyjobrunning) == 1)
{
flyjobrunning = 0;
SendClientMessage(playerid, COLOR_RED, "You left the plane, you failed the job.");
}else if((flyjobrunning) == 0){
//Nothing
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
flyjobrunning = 0;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == info)
{
GameTextForPlayer(playerid, "~g~Welcome at the Fly job, use /flyinfo to know more", 3000, 3);
}
}
pawn Код:
#include <a_samp>
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define Checkpoint1 -256.0010,-1542.3809,3.9930
#define Checkpoint2 -231.8289,-1467.9810,4.9421
#define Checkpoint3 -193.9747,-1375.2502,4.7856
#define Checkpoint4 -246.0348,-1326.1063,8.9300
#define Checkpoint5 -407.1459,-1371.5518,23.6588
#define Checkpoint6 -564.7697,-1302.4977,22.5511
#define Checkpoint7 -569.0633,-1508.3352,9.1518
new combinejobrunning = 0;
new info;
forward GivePlayerOneExp(playerid);
public OnFilterScriptInit()
{
AddStaticVehicleEx(532,-370.1018,-1463.1403,26.6953,287.0754,0,0,10); // combine 1
AddStaticVehicleEx(532,-364.2571,-1479.7140,26.7041,285.6486,0,0,10); // combine 2
AddStaticVehicleEx(532,-361.6030,-1501.2618,24.8698,285.8201,0,0,10); // combine 3
info = CreatePickup(1239,1,-366.1941,-1440.3253,25.7266,-1);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/combine", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
SetPlayerCheckpoint(playerid, Checkpoint1, 3.0);
CreateObject(823,-256.0010,-1542.3809,3.9930,0,0,0);
combinejobrunning = 1;
GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s is now doing the Combine job.", name );
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a Combine to start the job");
}
if (strcmp("/combineinfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You need the harvest the weed.");
SendClientMessage(playerid, COLOR_YELLOW, "If you enter the combine, type /combine and a red marker will appear.");
SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the markers and you're done.");
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint1))
{
SetPlayerCheckpoint(playerid, Checkpoint2, 7.0);
CreateObject(823,-231.8289,-1467.9810,4.9421,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint2))
{
SetPlayerCheckpoint(playerid, Checkpoint3, 7.0);
CreateObject(823,-193.9747,-1375.2502,4.7856,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint3))
{
SetPlayerCheckpoint(playerid, Checkpoint4, 7.0);
CreateObject(823,-246.0348,-1326.1063,8.9300,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint4))
{
SetPlayerCheckpoint(playerid, Checkpoint5, 7.0);
CreateObject(823,-407.1459,-1371.5518,23.6588,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint5))
{
SetPlayerCheckpoint(playerid, Checkpoint6, 7.0);
CreateObject(823,-564.7697,-1302.4977,22.5511,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint6))
{
SetPlayerCheckpoint(playerid, Checkpoint7, 7.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint7))
{
GivePlayerMoney(playerid, 10000);
GameTextForPlayer(playerid, "~g~You Completed the job, well done!You got 10000$", 3000, 3);
SetVehicleToRespawn(2);
DisablePlayerCheckpoint(playerid);
combinejobrunning = 0;
}
}
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
SendClientMessage(playerid, COLOR_RED, "You can start the combine-job with /combine");
}
return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((combinejobrunning) == 1)
{
combinejobrunning = 0;
SendClientMessage(playerid, COLOR_RED, "You left your combine behind, get in again if you want to continue your job.");
}else if((combinejobrunning) == 0){
//Nothing
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
combinejobrunning = 0;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == info)
{
GameTextForPlayer(playerid, "~g~Welcome to the Combine job, use /combineinfo for info about the job", 3000, 3);
}
}
Re: 3 Job's Help me ! -
yaron0600 - 31.12.2012
Tested it and still no money...