[HELP] What is wrong with this command?
#1

Hello again, well, the title says it all.

Код:
if(strcmp(cmd, "/takejob", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pJob] == 0)
	    {
     		if(gTeam[playerid] == 1 || gTeam[playerid] == 2 || gTeam[playerid] == 3 || gTeam[playerid] == 4 || gTeam[playerid] == 5)
			  {
			    SendClientMessage(playerid, COLOR_GREY, "	You can not get a job if you are a faction member.");
			    return 1;
  			 	}
			  if(GetPlayerState(playerid) == 1 && PlayerToPoint(5.0, playerid, -1722.1085,-117.8422,3.5489))
				{
				  SendClientMessage(playerid, COLOR_LIGHTYELLOW, "Congratulations, you are now a truck driver.");
				  SendClientMessage(playerid, COLOR_LIGHTYELLOW, "Type /jobhelp for more information.");
  				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					PlayerPlayMusic(playerid);
					PlayerInfo[playerid][pJob] = 1;
				}
  			else if(GetPlayerState(playerid) == 2 && PlayerToPoint(5.0, playerid, -1059.9210,-1205.4829,129.2188))
				{
				  SendClientMessage(playerid, COLOR_LIGHTYELLOW, "Congratulations, you are now a farmer.");
				  SendClientMessage(playerid, COLOR_LIGHTYELLOW, "Type /jobhelp for more information.");
  				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					PlayerPlayMusic(playerid);
					PlayerInfo[playerid][pJob] = 2;
				}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "	You already have a job.");
			}
		}
		return 1;
	}
Thanks
Reply


Messages In This Thread
[HELP] What is wrong with this command? - by FreddeN - 23.04.2010, 10:00
Re: [HELP] What is wrong with this command? - by cessil - 23.04.2010, 10:08
Re: [HELP] What is wrong with this command? - by FreddeN - 23.04.2010, 10:55
Re: [HELP] What is wrong with this command? - by FreddeN - 23.04.2010, 11:20
Re: [HELP] What is wrong with this command? - by FreddeN - 23.04.2010, 16:54
Re: [HELP] What is wrong with this command? - by Obie27 - 23.04.2010, 16:55
Re: [HELP] What is wrong with this command? - by Adil - 23.04.2010, 19:14
Re: [HELP] What is wrong with this command? - by Onyx09 - 23.04.2010, 19:19

Forum Jump:


Users browsing this thread: 4 Guest(s)