Mechanic call.
#1

I want to change the mechanic call i got from the normal call to some thing like when the caller asks for a mechanic the mechanic cant /accept mechanic he just gets the information from the caller said like i /call 555 and say : I need a mechanic at Grove street, that message sends to all on duty mechanic instead of "(Player name) is in need of car mechanic /accept mechanic"


My normal mechanic call:
Код:
   			    if(mechanicworkers < 1)
		        {
		            SendClientMessage(playerid, TEAM_GROVE_COLOR, "** They Picked up the call.");
		            SendClientMessage(playerid, 0xBBE1F2AA, "Men voice Says (cellphone): Sorry we have no mechanics available at the moment.");
		            SendClientMessage(playerid, TEAM_CYAN_COLOR, "** They hang up.");
		            return 1;
		        }

			    format(string, sizeof(string), "** %s is in need of a Car Mechanic. (use /accept mechanic to accept the call)", sendername);
		    	SendJobMessage(7, COLOR_WHITE, string);
		    	SendClientMessage(playerid, TEAM_GROVE_COLOR, "** They Picked up the call.");
		       	SendClientMessage(playerid, 0xBBE1F2AA, "Men voice Says (cellphone): Hello, all mechanics at your area have been informed about your call.");
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "** They hang up.");
		    	MechanicCall = playerid;
		    	return 1;
   			}
Ps: when i /call 555 he just answers and hangs up leaving a marker for the mechanic who accepted the call, i want the player to be able to say his message like the 911 call, Thx.

EDIT: the /accept mechanic code too

Код:
			else if(strcmp(x_job,"mechanic",true) == 0)
			{
			    if(PlayerInfo[playerid][pJob] != 7)
			    {
			        SendClientMessage(playerid, COLOR_GREY, "   You are not a Car Mechanic !");
				    return 1;
			    }
	            if(MechanicCallTime[playerid] > 0)
	            {
	                SendClientMessage(playerid, COLOR_GREY, "   You have already accepted a Mechanic Call !");
				    return 1;
	            }
	            if(MechanicCall < 999)
	            {
	                if(IsPlayerConnected(MechanicCall))
	                {
	                    
	                	GetPlayerName(MechanicCall, giveplayer, sizeof(giveplayer));
	                	format(string, sizeof(string), "* You have accepted the Mechanic Call from %s, you have 90 Seconds to get there.",giveplayer);
						SendClientMessage(playerid, COLOR_WHITE, string);
						SendClientMessage(playerid, COLOR_WHITE, "* After the 90 Seconds the Red Marker will dissapear.");
                        format(string, sizeof(string), "* Car Mechanic %s has accepted your Mechanic Call please wait at your current Position.",sendername);
						SendClientMessage(MechanicCall, COLOR_WHITE, string);
						new Float:X,Float:Y,Float:Z;
						GetPlayerPos(MechanicCall, X, Y, Z);
						SetPlayerCheckpoint(playerid, X, Y, Z, 5);
						GameTextForPlayer(playerid, "~w~Mechanic Caller~n~~r~Goto redmarker", 5000, 1);
						MechanicCallTime[playerid] = 1;
						MechanicCall = 999;
						return 1;
					}
	            }
	            else
	            {
	                SendClientMessage(playerid, COLOR_GREY, "   No-one called for a Car Mechanic yet !");
			    	return 1;
	            }
			}
Reply
#2

Requesting a Medic job using Y_INI, but the commands like, /healplayer [ID] [PRICE] --> It sends a message to the target before it heals him, .:: PlayerID offered you health-restoring for (PRICE), type /accept medicheal to get your health back. ::. So, when he type /accept medicheal it gives health to the player.
Reply
#3

huh? you didnt understand me, i want it like when the caller says like: i am in unity i want to fix the vehicle's engine that message sends to all the mechanics and not makes them /accept mechanic so that all the mechanics can go the requested place without accepting it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)