06.02.2014, 17:53
So i am creating family info command, so admins can check each family info, but i got some errors.
My command:
PHP код:
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(106395) : error 021: symbol already defined: "string"
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(106392) : warning 204: symbol is assigned a value that is never used: "string"
PHP код:
CMD:afstats(playerid, params[])
{
if(!(PlayerInfo[playerid][pAdmin] >= 6 || PlayerInfo[playerid][pGangModerator])) { SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); return 1; }
new string[128], familyid;
if(sscanf(params, "d", familyid)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /afstats [family]"); return 1; }
if(familyid < 1 || familyid > 14) return SendClientMessageEx(playerid, COLOR_WHITE, "Invalid Family Number.");
new family, string[128];
familyid -= 1;
format(string, 256, "Family: %s, Money: $%d, Mats: %d, Pot: %d, Crack: %d",
FamilyInfo[family][FamilyName], FamilyInfo[family][FamilyBank], FamilyInfo[family][FamilyMats], FamilyInfo[family][FamilyPot], FamilyInfo[family][FamilyCrack]);
SendClientMessage(playerid, COLOR_YELLOW2, string);
return 1;
}