help with cmd (Not working)
#1

So the think is my /adjust cmd doesn't work properly. Please help

Код:
	if(strcmp(cmd, "/adjust", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
         if(PlayerInfo[playerid][pFMember] == 255)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You are not in a Family !");
	            return 1;
	        }
	        new family = PlayerInfo[playerid][pFMember];
	        new wstring[128];
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "%s", sendername);
			strmid(wstring, string, 0, strlen(string), 255);
	        if(strcmp(FamilyInfo[family][FamilyLeader],wstring, true ) == 0 || PlayerInfo[playerid][pRank] > 4)
			{
			    new x_nr[256];
				x_nr = strtok(cmdtext, idx);
				if(!strlen(x_nr))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /adjust [name]");
					SendClientMessage(playerid, COLOR_WHITE, "Available Names: Name, MOTD, Color, Invite, Uninvite, Rank, Rankname, Safe");
					return 1;
				}
Its showing : You are not in family...
Reply
#2

pawn Код:
if(PlayerInfo[playerid][pFMember] != 255)
Perhaps.
Reply
#3

Now it's showing unknown command
Reply
#4

By "not working", do you mean that it says UNKNOWN COMMAND or that it just simply doesn't work/return anything?
Reply
#5

I just changed to
Quote:

if(PlayerInfo[playerid][pFMember] == 255)

to
Quote:

if(PlayerInfo[playerid][pFMember] != 255)

and server printed out unknown command
Reply
#6

Please Someone!
Reply
#7

There's no need to bump it bro...


How is PlayerInfo[playerid][pFMember] set? If PlayerInfo[playerid][pFMember] == 255 means that they're not part of anything, then you would use that.
Reply
#8

Hmm so how can I set it by fanction members?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)