help with cmd (Not working) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with cmd (Not working) (
/showthread.php?tid=314172)
help with cmd (Not working) -
trapped1 - 28.01.2012
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...
Re: help with cmd (Not working) -
=WoR=Varth - 28.01.2012
pawn Код:
if(PlayerInfo[playerid][pFMember] != 255)
Perhaps.
Re: help with cmd (Not working) -
trapped1 - 28.01.2012
Now it's showing unknown command
Re: help with cmd (Not working) -
Mosslah - 28.01.2012
By "not working", do you mean that it says UNKNOWN COMMAND or that it just simply doesn't work/return anything?
Re: help with cmd (Not working) -
trapped1 - 28.01.2012
I just changed to
Quote:
if(PlayerInfo[playerid][pFMember] == 255)
|
to
Quote:
if(PlayerInfo[playerid][pFMember] != 255)
|
and server printed out unknown command
Re: help with cmd (Not working) -
trapped1 - 28.01.2012
Please Someone!
Re: help with cmd (Not working) -
[ABK]Antonio - 28.01.2012
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.
Re: help with cmd (Not working) -
trapped1 - 28.01.2012
Hmm so how can I set it by fanction members?