Help vehicles RP.
#1

Hi all sorry if I have a bad English this is translated to the translator of ******. Well, I'm very new to creating themes servers "Roleplay" The GF But I am going to change, I am starting to create the work of taxi drivers, and I would like to know how to choose the vehicle of a job. That is a normal person is mounted on the truck cab and tell him you are not authorized to use this vehicle just taxi drivers.

This is a request help through example.
Reply
#2

Plz hepme.
Reply
#3

You wanna Taxi Job with cars just for people who are take Taxi Job?
Reply
#4

Yes plz help, i have the GF.
Reply
#5

Found in GF GameMod "public ShowStats(playerid,targetid) " (In orginal GM line 5714).
There found this(In orginal GM line 5843-5859):

Код:
    new jtext[20];
    if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
    else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
    else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
    else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drugs Dealer"; }
    else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jacker"; }
    else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
    else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Car Mechanic"; }
    else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
    else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Arms Dealer"; }
    else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
		else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
    else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Bus Driver"; }
    else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
    else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
    else { jtext = "None"; }
and there you add
Код:
else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Taxi Driver"; }
now it looks like this:
Код:
    new jtext[20];
    if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
    else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
    else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
    else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drugs Dealer"; }
    else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jacker"; }
    else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
    else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Car Mechanic"; }
    else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
    else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Arms Dealer"; }
    else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
		else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
    else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Bus Driver"; }
    else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
    else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
     else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Taxi Driver"; }
    else { jtext = "None"; }
Found in GF GameMode this(In orginal GM line 3976-3983):
Код:
		if(newcar == 82 || newcar == 84 || newcar == 85 || newcar == 94)
		{
		  if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10) { }
		  else
			{
		    SendClientMessage(playerid,COLOR_GREY,"  You are not a Taxi Driver !");
		    RemovePlayerFromVehicle(playerid);
		  }
and replacement with this:
Код:
		if(newcar == 82 || newcar == 84 || newcar == 85 || newcar == 94)
		{
		  if(PlayerInfo[playerid][pJob] == 18) { }
		  else
			{
		    SendClientMessage(playerid,COLOR_GREY,"  You are not a Taxi Driver !");
		    RemovePlayerFromVehicle(playerid);
		  }
		}
In "/help" Command (In orginal GM line 16194-16250) found this(In orginal GM line 16228-16229):
Код:
		  else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14) {
		  SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /fare"); }
and replacement with this:
Код:
		  else if(PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob] == 14) {
		  SendClientMessage(playerid,COLOR_GRAD5,"*** JOB *** /fare"); }
Now found in GF GameMode Command "/fare " (In Orginal GM line 20296-2037:
Код:
	if(strcmp(cmd,"/fare",true)==0)
  {
    if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14)
			{
				if(TransportDuty[playerid] > 0)
				{
				  if(TransportDuty[playerid] == 1)
				  {
				    TaxiDrivers -= 1;
				  }
				  else if(TransportDuty[playerid] == 2)
				  {
				    BusDrivers -= 1;
				  }
				  TransportDuty[playerid] = 0;
					format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					GivePlayerMoney(playerid, TransportMoney[playerid]);
					ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
					return 1;
				}
				new Veh = GetPlayerVehicleID(playerid);
				if(Veh == 82 || Veh == 84 || Veh == 85 || Veh == 94)
				{
				  if(GetPlayerState(playerid) == 2)
				  {
					  tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "  Fare price must be between $1 and $999 !"); return 1; }
					  TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
					  GetPlayerName(playerid,sendername,sizeof(sendername));
	  				format(string, sizeof(string), "Taxi Driver %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]);
	  				OOCNews(TEAM_GROVE_COLOR,string);
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  You are not the Driver !");
					  return 1;
					}
				}
				else if(Veh == 64 || Veh == 65)
				{
				  if(GetPlayerState(playerid) == 2)
				  {
					  tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, "  Fare price must be between $1 and $99999 !"); return 1; }
					  BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
					  GetPlayerName(playerid,sendername,sizeof(sendername));
	  				format(string, sizeof(string), "Bus Driver %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]);
	  				OOCNews(TEAM_GROVE_COLOR,string);
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  You are not the Driver !");
					  return 1;
					}
				}
				else
				{
				  SendClientMessage(playerid, COLOR_GREY, "  You are not in a Taxi / Bus !");
				}
			}
			else
			{
			  SendClientMessage(playerid,COLOR_GREY,"  You are not a Taxi / Bus Driver !");
			  return 1;
			}
	  }
	  return 1;
 	}
and replacement with this:
Код:
	if(strcmp(cmd,"/fare",true)==0)
  {
    if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob] == 14)
			{
				if(TransportDuty[playerid] > 0)
				{
				  if(TransportDuty[playerid] == 1)
				  {
				    TaxiDrivers -= 1;
				  }
				  else if(TransportDuty[playerid] == 2)
				  {
				    BusDrivers -= 1;
				  }
				  TransportDuty[playerid] = 0;
					format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					GivePlayerMoney(playerid, TransportMoney[playerid]);
					ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
					return 1;
				}
				new Veh = GetPlayerVehicleID(playerid);
				if(Veh == 82 || Veh == 84 || Veh == 85 || Veh == 94)
				{
				  if(GetPlayerState(playerid) == 2)
				  {
					  tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "  Fare price must be between $1 and $999 !"); return 1; }
					  TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
					  GetPlayerName(playerid,sendername,sizeof(sendername));
	  				format(string, sizeof(string), "Taxi Driver %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]);
	  				OOCNews(TEAM_GROVE_COLOR,string);
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  You are not the Driver !");
					  return 1;
					}
				}
				else if(Veh == 64 || Veh == 65)
				{
				  if(GetPlayerState(playerid) == 2)
				  {
					  tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, "  Fare price must be between $1 and $99999 !"); return 1; }
					  BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
					  GetPlayerName(playerid,sendername,sizeof(sendername));
	  				format(string, sizeof(string), "Bus Driver %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]);
	  				OOCNews(TEAM_GROVE_COLOR,string);
					}
					else
					{
					  SendClientMessage(playerid, COLOR_GREY, "  You are not the Driver !");
					  return 1;
					}
				}
				else
				{
				  SendClientMessage(playerid, COLOR_GREY, "  You are not in a Taxi / Bus !");
				}
			}
			else
			{
			  SendClientMessage(playerid,COLOR_GREY,"  You are not a Taxi / Bus Driver !");
			  return 1;
			}
	  }
	  return 1;
 	}
NEXT POST
Reply
#6

Found in GF GameMode command "/join" (In orginal GM line 21542-21665)

Just found command,I cant copy here because she is to big...

and replacement with this:

Код:
	if(strcmp(cmd, "/join", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(PlayerInfo[playerid][pJob] == 0)
			{
			  if(gTeam[playerid] == 1 || gTeam[playerid] == 2 || gTeam[playerid] == 4 || gTeam[playerid] == 11)
			  {
			    SendClientMessage(playerid, COLOR_GREY, "  You must be a Civilian (Not Wanted) or a Family Member to get a Job !");
			    return 1;
			  }
			  if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,359.5408,206.7693,1008.3828))
				{
				  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Detective, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Detective, type /accept job.");
				  GettingJob[playerid] = 1;
				}
				else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,347.7374,193.7241,1014.1875))
				{
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Lawyer, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Lawyer, type /accept job.");
				  GettingJob[playerid] = 2;
				}
				else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,1215.1304,-11.8431,1000.9219))
				{
				  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Whore, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Whore, type /accept job.");
				  GettingJob[playerid] = 3;
				}
				else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,2166.3772,-1675.3829,15.0859))
				{
				  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Drugs Dealer, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Drugs Dealer, type /accept job.");
				  GettingJob[playerid] = 4;
				}
				else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,1109.3318,-1796.3042,16.5938))
				{
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Car Jacker, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Car Jacker, type /accept job.");
				  GettingJob[playerid] = 5;
				}
				else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,-1932.3859,276.2117,41.0391))
				{
				  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Car Mechanic, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Car Mechanic, type /accept job.");
				  GettingJob[playerid] = 7;
		 		}
				else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,2226.1716,-1718.1792,13.5165))
				{
				  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Bodyguard, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Bodyguard, type /accept job.");
				  GettingJob[playerid] = 8;
		 		}
		 		else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,1366.4325,-1275.2096,13.5469))
		 		{
		 		  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
		 		  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Arms Dealer, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Arms Dealer, type /accept job.");
				  GettingJob[playerid] = 9;
		 		}
		 		else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,531.7930,-1292.4044,17.2422))
		 		{
		 		  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Car Dealer, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Car Dealer, type /accept job.");
				  GettingJob[playerid] = 10;
		 		}
		 		else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,766.0804,14.5133,1000.7004))
		 		{
		 		  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
		 		  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Boxer, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Boxer, type /accept job.");
				  GettingJob[playerid] = 12;
		 		}
		 		else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,1154.2208,-1770.8203,16.5992))
		 		{
		 		  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
		 		  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Bus Driver, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Bus Driver, type /accept job.");
				  GettingJob[playerid] = 14;
		 		}
		 		else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,-2040.9436,456.2395,35.1719))
		 		{
		 		  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
		 		  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Paper Boy, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Paper Boy, type /accept job.");
				  GettingJob[playerid] = 15;
		 		}
		 		else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,-77.7288,-1136.3896,1.0781))
		 		{
		 		  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
		 		  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Trucker, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Trucker, type /accept job.");
				  GettingJob[playerid] = 16;
				}
 				else if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,x,y,z))//x,y,z change whit your cordinates
		 		{
		 		  if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pFMember] < 255) { SendClientMessage(playerid, COLOR_GREY, "  Families cannot take on this Job !"); return 1; }
		 		  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are about to become a Taxi Driver, and get a 5 hour Contract.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* If you are sure to become a Taxi Driver, type /accept job.");
				  GettingJob[playerid] = 17;
				}
		 		else
		 		{
		 		  SendClientMessage(playerid, COLOR_GREY, "  You are not even near a place to get a Job !");
		 		}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "  You already have a Job, use /quitjob first !");
			}
		}//not connected
	  return 1;
	}
If I forgot something let someone says but I think that's all ...

enjoy it
Reply
#7

Thanks men, bug have a error

Error:

Код:
D:\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\Gf.pwn(19) : fatal error 100: cannot read from file: "utils"
Reply
#8

Thats not problem in GameMode...
You must download "utilis.inc",you can download it
HERE(My upload)
When you download it go in your pawno folder,open the map "includes" and put file "utilis.inc" in...and then you go compile gamemode
Reply
#9

I Have error with the download plz upload in: www.rapidshared.com or www.megaupload.com Plzzzzz.
Reply
#10

http://www.megaupload.com/?d=SRGTRQ7L

...

Say here does it working or not...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)