need help with a command
#1

ok, i got a /gov command that kinda works. but it says "You Are Not A FBI Agent" even when they are
Код:
	if(strcmp(cmd, "/gov", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pMember]==2)
			{
    		SendClientMessage(playerid, COLOR_GREY, "  You Not A FBI Agent !");
    		return 1;
			}
			if(PlayerInfo[playerid][pRank] < 5)
			{
			  SendClientMessage(playerid, COLOR_GREY, "  You need to be Rank 5 to be able to use this !");
			  return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/gov)ernment [text]");
				return 1;
			}
			SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|");
			format(string, sizeof(string), "Goverment Offical %s: %s", sendername, result);
			SendClientMessageToAll(COLOR_DBLUE, string);
 			}
		return 1;
	}
i thought it was
Код:
			if(PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pMember]==2)
			{
    		SendClientMessage(playerid, COLOR_GREY, "  You Not A FBI Agent !");
    		return 1;
			}
and i tried removing that, and gave me abunch of errors
Reply


Messages In This Thread
need help with a command - by killar456 - 15.03.2009, 22:04
Re: need help with a command - by Zoopaman - 15.03.2009, 22:26
Re: need help with a command - by [RP]Rav - 15.03.2009, 22:29
Re: need help with a command - by killar456 - 15.03.2009, 23:03

Forum Jump:


Users browsing this thread: 1 Guest(s)