29.01.2015, 13:00
Hello SAMP,
Im having problem.
When i do /switchfam 1
The message showing up is Less than 1 or minus 1
If you did not understand ( When i do /switchfam 1 then the message showing "You have switch to family ID 0", Another example : When i do /switchfam 2 the message will show "You have switch to family ID 1)
Its a weird bug in my server, Small Bug only, Admins are getting confused which are real. If /switchfac 1 it should be saying "You have switch to family ID 1 not "You have switch to family ID 0"
Im having problem.
When i do /switchfam 1
The message showing up is Less than 1 or minus 1
If you did not understand ( When i do /switchfam 1 then the message showing "You have switch to family ID 0", Another example : When i do /switchfam 2 the message will show "You have switch to family ID 1)
Its a weird bug in my server, Small Bug only, Admins are getting confused which are real. If /switchfac 1 it should be saying "You have switch to family ID 1 not "You have switch to family ID 0"
pawn Код:
CMD:families(playerid, params[])
{
new string[128], familyid;
if(sscanf(params, "d", familyid))
{
new number = 0;
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
number ++;
if(FamilyInfo[i][FamilyTurfTokens] < 12)
{
format(string, sizeof(string), "Family %d | Name: %s | Leader: %s | Members: %d | Claim Tokens: 0.",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers]);
}
else
{
format(string, sizeof(string), "Family %d | Name: %s | Leader: %s | Members: %d | Claim Tokens: %d.",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers],FamilyInfo[i][FamilyTurfTokens]/12);
}
SendClientMessageEx(playerid, COLOR_WHITE, string);
}
return 1;
}
if(familyid < 1 || familyid > MAX_FAMILY) { SendClientMessageEx(playerid, COLOR_GREY, "Family slot must be between 1 and 14."); return 1; }
familyid -= 1;
if(FamilyInfo[familyid][FamilyTaken] != 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "That family slot is empty.");
return 1;
}
foreach(Player, i)
{
if(PlayerInfo[i][pRank] == 1)
{
format(string, sizeof(string), "* %s: %s | Rank: %s (1).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank1]);
}
else if(PlayerInfo[i][pRank] == 2)
{
format(string, sizeof(string), "* %s: %s | Rank: %s (2).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank2]);
}
else if(PlayerInfo[i][pRank] == 3)
{
format(string, sizeof(string), "* %s: %s | Rank: %s (3).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank3]);
}
else if(PlayerInfo[i][pRank] == 4)
{
format(string, sizeof(string), "* %s: %s | Rank: %s (4).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank4]);
}
else if(PlayerInfo[i][pRank] == 5)
{
format(string, sizeof(string), "* %s: %s | Rank: %s (5).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank5]);
}
else if(PlayerInfo[i][pRank] == 6)
{
format(string, sizeof(string), "* %s: %s | Rank: %s (6).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank6]);
}
else
{
format(string, sizeof(string), "* %s: %s | Rank: %s.",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank1]);
}
SendClientMessageEx(playerid, COLOR_GREY, string);
}
return 1;
}
pawn Код:
CMD:switchfam(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pGangModerator] >= 1)
{
if(PlayerInfo[playerid][pAdminDuty] != 1 && PlayerInfo[playerid][pAdmin] < 100001 && !IsPlayerAdmin(playerid) && PlayerInfo[playerid][pGangModerator] != 1)
return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
new string[128], familyid;
if(sscanf(params, "d", familyid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /switchfam [familyid]");
if(familyid < 1 || familyid > 14) return SendClientMessageEx(playerid, COLOR_WHITE, "Invalid Family Number.");
format(string, sizeof(string), "You have switched to family ID %d (%s).", familyid-1, FamilyInfo[familyid-1][FamilyName]);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = familyid-1;
}
return 1;
}
I PROMISE TO GOD, I WILL GIVE TO ALL +REP WHO WILL TRY TO HELP ME