Problem with UNKNOWN CMD
#1

I have this code I found on LARP GM:
Код:
if(strcmp(cmdtext, "/job", true) == 0)
 	{
	 	new job[64];
	 	new giveplayer[MAX_PLAYER_NAME];
	 	new string[256];
	 	job = strtok(cmdtext, idx);
	 	if(IsPlayerConnected(playerid))
		{
		 	if(!strlen(job)){
				SendClientMessage(playerid, COLOR_GREEN, "* ------------ /job ------------ *");
				SendClientMessage(playerid, COLOR_WHITE, "taxi, bus, cop, medic, limo, sex, fire :афщшейеъ оъчбмеъ");
				SendClientMessage(playerid, COLOR_GREEN, "* --------------------------------- *");
				return 1;
			}
			if(strcmp(job,"medic",true) == 0)
			{
			    if(PlayerInfo[playerid][pJob] == 6)
			    {
		            if(MedicCallTime[playerid] > 0)
		            {
		                SendClientMessage(playerid, COLOR_GREY, "   You have already accepted a Medic Call !");
					    return 1;
		            }

		            if(medicCall < 999)
		            {
		                if(IsPlayerConnected(medicCall))
		                {

		                	GetPlayerName(medicCall, giveplayer, sizeof(giveplayer));
		                	format(string, sizeof(string), "* You have accepted the Medic Call from %s, you have 30 Seconds to get there.",giveplayer);
							SendClientMessage(playerid, COLOR_WHITE, string);
							SendClientMessage(playerid, COLOR_WHITE, "* After the 30 Seconds the Red Marker will dissapear.");
	                        format(string, sizeof(string), "* Medic %s has accepted your Medic Call please wait at your current Position.","d");
							SendClientMessage(medicCall, COLOR_WHITE, string);
							new Float:X,Float:Y,Float:Z;
							GetPlayerPos(medicCall, X, Y, Z);
							SetPlayerCheckpoint(playerid, X, Y, Z, 5);
							GameTextForPlayer(playerid, "~w~Medic Caller~n~~r~Goto redmarker", 5000, 1);
							MedicCallTime[playerid] = 1;
							medicCall = 999;
							return 1;
						}
		            }
		            else
		            {
		                SendClientMessage(playerid, COLOR_GREY, "   No-one called for a Medic yet !");
				    	return 1;
		            }
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   You are not a Medic !");
				    return 1;
				}
			}
			else { return 1; }
		}//not connected
		return 1;
	}
And if I try to write "/job" it writes me the taxi, bus, cop, medic, limo, sex, fire .... and if I type "/job medic" - its sais UNKNOWN COMMAND, what is the problem ?

Thank you very much!
Reply


Messages In This Thread
Problem with UNKNOWN CMD - by orrgoren11 - 16.05.2011, 19:15
Re: Problem with UNKNOWN CMD - by lowrida018 - 16.05.2011, 19:17
Re: Problem with UNKNOWN CMD - by orrgoren11 - 16.05.2011, 19:39
Re: Problem with UNKNOWN CMD - by lowrida018 - 16.05.2011, 19:42
Re: Problem with UNKNOWN CMD - by orrgoren11 - 16.05.2011, 19:45
Re: Problem with UNKNOWN CMD - by lowrida018 - 16.05.2011, 19:46
Re: Problem with UNKNOWN CMD - by orrgoren11 - 16.05.2011, 19:51
Re: Problem with UNKNOWN CMD - by orrgoren11 - 16.05.2011, 20:37
Re: Problem with UNKNOWN CMD - by orrgoren11 - 17.05.2011, 11:58

Forum Jump:


Users browsing this thread: 3 Guest(s)