10.04.2014, 16:50
I made a command for only who family member able to use this.
so my problem is that i didn't write it good probably and i dont know what wrong.
have a quick look on the code and then read under this:
At first use command /gf it should send me this: (that works)
after i set the number of family i wanted to talk to it, it should send me this:
Then i can talk to this family freely (the isnull params)
The problem is that it keeps sending me
Thanks in advance, +REP will make you more to help me ah
so my problem is that i didn't write it good probably and i dont know what wrong.
have a quick look on the code and then read under this:
Код:
CMD:gf(playerid, params[]) { new string[128], family; if(PlayerInfo[playerid][pFMember] < 255) { if(sscanf(params, "d", family)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gf [familyid] (Type /families)"); if(family > 14 || family < 1) return SendTDMessage(playerid, COLOR_WHITE, "FamilyID cannot be lower than 1 and greater than 14."); SetPVarInt(playerid, "FamilyInto", family); } if(GetPVarInt(playerid, "FamilyInto") >= 1) { if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /gf [Global OOC families chat]"); foreach(Player, i) if(PlayerInfo[i][pFMember] < 255) { format(string, sizeof(string), "(( OOC Families chat %s: %s ))", GetPlayerNameEx(playerid), params); SendClientMessage(i, COLOR_GF, string); } else { SendTDMessage(playerid, COLOR_WHITE, "You haven't set the FamilyID you wish talk to."); } } else { SendTDMessage(playerid, COLOR_WHITE, "You're not a part of a Family!"); } return 1; }
Код:
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gf [familyid] (Type /families)");
Код:
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /gf [Global OOC families chat]");
The problem is that it keeps sending me
Код:
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gf [familyid] (Type /families)");