if(strcmp(cmd, "/alistfaction", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "[Usage:] /alistfaction [id]");
return 1;
}
new text = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 10)
{
new wstring[128];
format(wstring, sizeof(wstring), "[ID:%d] Faction Name: %s - Materials: %d - Drugs: %d - Money: $%d - Join Rank: %d - Use Skins: %d - Type: %d",text, DynamicFactions[text][fName],DynamicFactions[text][fMaterials],DynamicFactions[text][fDrugs],DynamicFactions[text][fBank],DynamicFactions[text][fJoinRank],DynamicFactions[text][fUseSkins],DynamicFactions[text][fType]);
SendClientMessage(playerid,COLOR_ADMINCMD, wstring);
format(wstring, sizeof(wstring), "[ID:%d] Skins: %d|%d|%d|%d|%d|%d|%d|%d|%d|%d - Rank Amount: %d - Use Color: %d", text,DynamicFactions[text][fSkin1],DynamicFactions[text][fSkin2],DynamicFactions[text][fSkin3],DynamicFactions[text][fSkin4],DynamicFactions[text][fSkin5],DynamicFactions[text][fSkin6],DynamicFactions[text][fSkin7],DynamicFactions[text][fSkin8],DynamicFactions[text][fSkin9],DynamicFactions[text][fSkin10],DynamicFactions[text][fRankAmount],DynamicFactions[text][fUseColor]);
SendClientMessage(playerid,COLOR_ADMINCMD, wstring);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] You are not authorized to use that command");
}
}
return 1;
}
|
Originally Posted by RSX
You have an array, and you are trying to use something that doesn't exist and is over limits, in addiction, i can say, that arrays don't make leaps for oversizes, they just don't work, and returns 0 in some wierd way >> "Server: Unknown command" comes here, you just need to enlarge that array, where you use 11th cell (If you didn't really got it, i can show you whitch it is..)
|