Jump to content
  • 0

Problema /takejob


L3on

Question

De fiecare data cand dau /takejob si aleg un job, imi zice sa scriu /accept job pentru a deveni mecanic, indiferent de ce aleg. Cum as putea remedia problema?

Comanda:

if(strcmp(cmd,"/takejob",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerToPoint(3.0,playerid,362.4521,173.6969,1008.3828))
            {
               new x_nr[256];
               x_nr = strtok(cmdtext, idx);
               if(!strlen(x_nr)) {
               SendClientMessage(playerid, COLOR_LIGHTGREEN, "|______________________ Jobs _____________________|");
               SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /takejob [name]");
               SendClientMessage(playerid, COLOR_GRAD2, "Available names: Farmer, Trucker, Mechanic, Bodyguard");
               SendClientMessage(playerid, COLOR_GRAD2, "Available names: BusDriver, Boxer, CarDealer, PaperBoy");
               SendClientMessage(playerid, COLOR_LIGHTGREEN, "|_________________________________________________|");
               return 1;
            }
    			if (GetPlayerState(playerid) == 1 && PlayerToPoint(3.0, playerid,362.4521,173.6969,1008.3828))
                {
                	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,362.4521,173.6969,1008.3828))
                {
                	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,531.7930,-1292.4044,17.2422))
		  		{
		  		    SCM(playerid, COLOR_LIGHTBLUE, "* You are about to become a Car Dealer, and get a 5 hour Contract.");
				    SCM(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				    SCM(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) { SCM(playerid, COLOR_GREY, "   Families cannot take on this Job !"); return 1; }
		  		    SCM(playerid, COLOR_LIGHTBLUE, "* You are about to become a Boxer, and get a 5 hour Contract.");
				    SCM(playerid, COLOR_LIGHTBLUE, "* You have to forfill this Contract first, if you want to Quit the job later.");
				    SCM(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,362.4521,173.6969,1008.3828))
      			{
         			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,362.4521,173.6969,1008.3828))
           		{
             		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,362.4521,173.6969,1008.3828))
              	{
              		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(strcmp(x_nr,"Mechanic",true) == 0)
      			{
        			if (GetPlayerState(playerid) == 1)
          			{
                     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Now that you have confirmed you want the Job, you got a 5 hour Contract.");
      				 	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
        			 	PlayerInfo[playerid][pJob] = 7;
            		}
           		}
   				else if(strcmp(x_nr,"Bodyguard",true) == 0)
      			{
        			if (GetPlayerState(playerid) == 1)
          			{
                     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Now that you have confirmed you want the Job, you got a 5 hour Contract.");
      				 	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
        			 	PlayerInfo[playerid][pJob] = 8;
            		}
           		}
   				else if(strcmp(x_nr,"BusDriver",true) == 0)
      			{
        			if (GetPlayerState(playerid) == 1)
          			{
                     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Now that you have confirmed you want the Job, you got a 5 hour Contract.");
      				 	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
        			 	PlayerInfo[playerid][pJob] = 14;
            		}
           		}
   				else if(strcmp(x_nr,"PaperBoy",true) == 0)
      			{
        			if (GetPlayerState(playerid) == 1)
          			{
                     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Now that you have confirmed you want the Job, you got a 5 hour Contract.");
      				 	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
        			 	PlayerInfo[playerid][pJob] = 15;
            		}
           		}
   				else if(strcmp(x_nr,"Trucker",true) == 0)
      			{
        			if (GetPlayerState(playerid) == 1)
          			{
                     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Now that you have confirmed you want the Job, you got a 5 hour Contract.");
      				 	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
       				    PlayerInfo[playerid][pJob] = 16;
            		}
           		}
   				else if(strcmp(x_nr,"Boxer",true) == 0)
      			{
        			if (GetPlayerState(playerid) == 1)
          			{
                     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Now that you have confirmed you want the Job, you got a 5 hour Contract.");
      				 	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
        			 	PlayerInfo[playerid][pJob] = 12;
            		}
           		}
   				else if(strcmp(x_nr,"CarDealer",true) == 0)
      			{
        			if (GetPlayerState(playerid) == 1)
          			{
                     	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Now that you have confirmed you want the Job, you got a 5 hour Contract.");
      				 	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
        				PlayerInfo[playerid][pJob] = 10;
            		}
           		}
		  		else
		  		{
		  		    SCM(playerid, COLOR_GREY, "   You are not at the City Hall !");
		  		}
			}
			else
			{
			    SCM(playerid, COLOR_GREY, "   You already have a job, use /quitjob first !");
			}
		}//not connected
	    return 1;
	}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.