/stats won't show up anymore..
#1

Got a new problem, after making a admin jail system the /stats command won't work anymore.. it says ''Server: command does not exist'' or something like that.


pawn Код:
YCMD:stats(playerid, params[], help)
{
    if(help) return SCM(playerid, COLOR_GREY, "Not supported");

    if(IsPlayerConnected(playerid))
    {
        ShowStats(playerid,playerid);
    }
    return 1;
}
pawn Код:
stock ShowStats(playerid,targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new cash = GetPlayerMoney(targetid);
        new otext[20];
        if(PlayerInfo[targetid][pOrigin] == 1) { otext = "America"; }
        else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Europe"; }
        else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Asia"; }
        else if(PlayerInfo[targetid][pOrigin] == 4) { otext = "Africa"; }
        new ttext[21];
        if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
        else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civilian"; }
        else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "LSPD"; }
        else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI"; }
        else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "NG"; }
        else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "LSMC"; }
        else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "Surenos Gang"; }
        else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Signatra Mafia"; }
        else if(PlayerInfo[targetid][pMember] == 7 || PlayerInfo[targetid][pLeader] == 7) { ttext = "Government"; }
        else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen Company"; }
        else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "CNN"; }
        else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi Company"; }
        else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "LSLC"; }
        else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12) { ttext = "LSFD"; }
        else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 13) { ttext = "Sons of Anarchy Gang"; }
        else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14) { ttext = "Yamaguchi Mafia"; }
        else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15) { ttext = "Chornaya Mafia"; }
        else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16) { ttext = "La Vice Mafia"; }
        else if(PlayerInfo[targetid][pMember] == 17 || PlayerInfo[targetid][pLeader] == 17) { ttext = "Grove Street"; }
        else if(PlayerInfo[targetid][pMember] == 18 || PlayerInfo[targetid][pLeader] == 18) { ttext = "Black Disciples"; }
        else { ttext = "Civilian"; }
        new dtext[20];
        if(STDPlayer[targetid] == 1) { dtext = "Chlamydia"; }
        else if(STDPlayer[targetid] == 2) { dtext = "Gonorrhea"; }
        else if(STDPlayer[targetid] == 3) { dtext = "Syphilis"; }
        else { dtext = "None"; }
        new f2text[20];
        if(PlayerInfo[targetid][pFMember] < 255) { f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName]; }
        else { f2text = "None"; }
        new rtext[64];
        if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Soldier"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Godfather"; }
            else { rtext = "Outsider"; }
        }
        else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Cadet"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Officer"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Corporal"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Sergeant"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Captain"; }
            else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Deputy Chief"; }
            else if(PlayerInfo[targetid][pRank] == 8) { rtext = "Chief"; }
            else { rtext = "Cadet"; }
        }
        else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Cadet"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Agent"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Special Agent"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent in Charge"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Division Chief"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Assistant of Director"; }
            else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Deputy Director"; }
            else if(PlayerInfo[targetid][pRank] == 8) { rtext = "Director"; }
            else { rtext = "Intern"; }
        }
        else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Private"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Soldier"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Sergeant"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Major"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Captain"; }
            else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Sub General"; }
            else if(PlayerInfo[targetid][pRank] == 8) { rtext = "General"; }
            else { rtext = "Private"; }
        }
        else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)//PD Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "EMS Explorer"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "EMS Trainee"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "BLS Medic"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "ALS Medic"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "EMS Captain"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "EMS Lieutenant"; }
            else if(PlayerInfo[targetid][pRank] == 7) { rtext = "EMS Chief"; }
            else if(PlayerInfo[targetid][pRank] == 8) { rtext = "EMS Commisioner"; }
            else { rtext = "EMS Explorer"; }
        }
        else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)//Surenos Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Forastero"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Asociado"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Miembro"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Proscrito"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Mano Derecha"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Corona"; }
            else { rtext = "Guero"; }
        }
        else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)//La Famiglia Sinatra Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Giovane D'honore"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Piciotto"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Sgarrista"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Capo Regime"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Consiglieri"; }
            else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Capo Bastone"; }
            else if(PlayerInfo[targetid][pRank] == 8) { rtext = "Capo Crimini"; }
            else { rtext = "Outsider"; }
        }
        else if(PlayerInfo[targetid][pMember] == 7)//Mayor ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Mayor's driver"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Mayor's bodyguard"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Mayor's Drivers Chief"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Mayor's Security Chief"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Mayor's Assistant"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Mayor"; }
            else { rtext = "None"; }
        }
        else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Freelancer"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Marksman"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Agent"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Vice-Director"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
            else { rtext = "Freelancer"; }
        }
        else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Intern Worker"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Journalist"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Head Journalist"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Company Secretary"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "ABC Manager"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
            else { rtext = "Intern Worker"; }
        }
        else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi Rookie"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cabbie"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Dispatcher"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Shift Supervisor"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Company Owner"; }
            else { rtext = "Trainee"; }
        }
        else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
            else { rtext = "Trainee"; }
        }
        else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12)//FD Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Explorer"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Probitionary"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Firefighter"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Driver"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "FD Lieutenant"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "FD Captain"; }
            else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Assistant Chief"; }
            else if(PlayerInfo[targetid][pRank] == 8) { rtext = "FD Chief"; }
            else { rtext = "EMS Explorer"; }
        }
        else if(PlayerInfo[targetid][pMember] == 13 || PlayerInfo[targetid][pLeader] == 13)//Yamaguchi ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Rookie Rider"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Rider of Fights"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Rider of Chaos"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Rider of Anarchy"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Son of Anarchy"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Father of Anarchy"; }
            else { rtext = "Rookie Rider"; }
        }
        else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14)//Yamaguchi ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Gaij in"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Wakashu"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Shatei"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Don's right hand"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Don"; }
            else { rtext = "Gaij in"; }
        }
        else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15)//Chornaya Bratva gang Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Shestiorka"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Patsani"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Byki"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Pakhan"; }
            else { rtext = "Shestiorka"; }
        }
        else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16)//La Vice Ranks
        {
            if(PlayerInfo[targetid][pRank] == 1) { rtext = "Member"; }
            else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Loyal Member"; }
            else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Elite Member"; }
            else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Made Man"; }
            else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Advisor"; }
            else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Loyal Advisor"; }
            else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Elite Advisor"; }
            else if(PlayerInfo[targetid][pRank] == 8) { rtext = "Lower Boss"; }
            else if(PlayerInfo[targetid][pRank] == 9) { rtext = "Boss"; }
            else { rtext = "Dumb Hoe"; }
        }
        else
        {
            rtext = "None";
        }
        new jtext[20];
        if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
        else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
        else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
        else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drugs Dealer"; }
        else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jacker"; }
        else if(PlayerInfo[targetid][pJob] == 6) { jtext = "Waiter"; }
        else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Car Mechanic"; }
        else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
        else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
        else if(PlayerInfo[targetid][pJob] == 11) { jtext = "Stuntman"; }
        else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
        else if(PlayerInfo[targetid][pJob] == 13) { jtext = "Taxi Driver"; }
        else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Bus Driver"; }
        else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
        else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
        else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Pizza Boy"; }
        else if(PlayerInfo[targetid][pJob] == 18) { jtext = "Farmer"; }
        else if(PlayerInfo[targetid][pJob] == 19) { jtext = "Illegal Farmer"; }
        else if(PlayerInfo[targetid][pJob] == 20) { jtext = "Drugs Smuggler"; }
        else if(PlayerInfo[targetid][pJob] == 21) { jtext = "Street sweeper"; }
        else if(PlayerInfo[targetid][pJob] == 22) { jtext = "Materials smuggler"; }
        else if(PlayerInfo[targetid][pJob] == 23) { jtext = "Arms Dealer"; }
        else { jtext = "None"; }
        new drank[20];
        if(PlayerInfo[targetid][pRegularRank] == 1) { drank = "Regular Player"; }
        else { drank = "None"; }
        new ptime = PlayerInfo[targetid][pConnectSeconds];
        new arrests = PlayerInfo[targetid][pArrested];
        new drugs = PlayerInfo[targetid][pDrugs];
        new mats = PlayerInfo[targetid][pMats];
        new level = PlayerInfo[targetid][pLevel];
        new exp = PlayerInfo[targetid][pExp];
        new account = PlayerInfo[targetid][pAccount];
        new nxtlevel = PlayerInfo[targetid][pLevel]+1;
        new expamount = nxtlevel*levelexp;
        new carkey = PlayerInfo[targetid][pPcarkey];
        new carkey2 = PlayerInfo[targetid][pPcarkey2];
        new swatr[20];
        if(PlayerInfo[targetid][pSwat] == 1) { swatr = "Operative"; }
        else if(PlayerInfo[targetid][pSwat] == 2) { swatr = "Instructor"; }
        else if(PlayerInfo[targetid][pSwat] == 3) { swatr = "Team Sub-Leader"; }
        else if(PlayerInfo[targetid][pSwat] == 4) { swatr = "Team Leader"; }
        else { swatr = "None"; }
        new tacticalr[20];
        if(PlayerInfo[targetid][pTactical] == 1) { tacticalr = "Trainee Unit"; }
        else if(PlayerInfo[targetid][pTactical] == 2) { tacticalr = "Expert Agent"; }
        else if(PlayerInfo[targetid][pTactical] == 3) { tacticalr = "Elite Agent"; }
        else if(PlayerInfo[targetid][pTactical] == 4) { tacticalr = "Master Agent"; }
        else { tacticalr = "None"; }
        new specialfr[20];
        if(PlayerInfo[targetid][pSpecialF] == 1) { specialfr = "Soldier"; }
        else if(PlayerInfo[targetid][pSpecialF] == 2) { specialfr = "Masterchief"; }
        else if(PlayerInfo[targetid][pSpecialF] == 3) { specialfr = "Squad Sub-Leader"; }
        else if(PlayerInfo[targetid][pSpecialF] == 4) { specialfr = "Squad Leader"; }
        else { specialfr = "None"; }
        new fight[56];
        if(PlayerInfo[targetid][pFS] == 1) { fight = "Boxing"; }
        else if(PlayerInfo[targetid][pFS] == 2) { fight = "Grab'n'Kick"; }
        else if(PlayerInfo[targetid][pFS] == 3) { fight = "Kung Fu"; }
        else if(PlayerInfo[targetid][pFS] == 0) { fight = "Default"; }
        else if(PlayerInfo[targetid][pFS] == 4) { fight = "Knee Head"; }
        else if(PlayerInfo[targetid][pFS] == 5) { fight = "El Bow"; }
        new warned = PlayerInfo[targetid][pWarned];
        new Kills = PlayerInfo[targetid][pKills];
        new viplevel = PlayerInfo[targetid][pVIP];
        new GoldCoins = PlayerInfo[targetid][pGoldCoins];
        new Float:health;
        new name[MAX_PLAYER_NAME];
        new lastleaving = PlayerInfo[targetid][pWhyLeft];
        GetPlayerName(targetid, name, sizeof(name));
        GetPlayerHealth(targetid,health);
        new Float:px,Float:py,Float:pz;
        GetPlayerPos(targetid, px, py, pz);
        new Float:armour;
        GetPlayerArmour(playerid, armour);
        new coordsstring[256];
        format(coordsstring, sizeof(coordsstring),"Your stats");
        SCM(playerid, COLOR_YELLOW,coordsstring);
        format(coordsstring, sizeof(coordsstring), "Level: %d | Cash: $%d | Bank: $%d | Times Arrested: %d |", level,cash,account,arrests);
        SCM(playerid, 0x99CEFFFF,coordsstring);
        format(coordsstring, sizeof(coordsstring), "Total Playing Hours: %d | Total Playing Mins: %d | Total Playing Secs: %d |",(ptime / 3600), (ptime / 60), ptime);
        SCM(playerid, 0x99CEFFFF,coordsstring);
        format(coordsstring, sizeof(coordsstring), "Respect: %d/%d | Drugs: %d | Materials: %d | Faction: %s | Rank: %s |",exp,expamount,drugs,mats,ttext,rtext);
        SCM(playerid, 0x99CEFFFF,coordsstring);
        format(coordsstring, sizeof(coordsstring), "Health: %.1f | Armour: %.1f | Last Leaving: %s | Fighting: %s |",health, armour, lastleaving, fight);
        SCM(playerid, 0x99CEFFFF,coordsstring);
        format(coordsstring, sizeof(coordsstring), "HireKey: %d | Job: %s | Extra Car Key: %d | Warnings: %d | Kills: %d | ",HireCar[targetid],jtext,sparekey,warned,Kills);
        SCM(playerid, 0x99CEFFFF,coordsstring);
        if (PlayerInfo[targetid][pPcarkey] != 9999 && PlayerInfo[targetid][pPcarkey2] != 9999)
        {
            new vehiclename[24];
            GetVehicleName(carkey2, vehiclename, sizeof(vehiclename));
            format(coordsstring, sizeof(coordsstring), "Car1: %d | Car2: %d | Gold: %d | VIP Level: %d |",carkey, carkey2, GoldCoins, viplevel);
            SCM(playerid, COLOR_GRAD,coordsstring);
        }
        else if (PlayerInfo[targetid][pPcarkey] != 9999)
        {
            new vehiclename[24];
            GetVehicleName(carkey, vehiclename, sizeof(vehiclename));
            format(coordsstring, sizeof(coordsstring), "Car1: %d | Gold: %d | VIP Level: %d |",carkey, GoldCoins, viplevel);
            SCM(playerid, COLOR_GRAD,coordsstring);
        }
        else if (PlayerInfo[targetid][pPcarkey2] != 9999)
        {
            new vehiclename[24];
            GetVehicleName(carkey2, vehiclename, sizeof(vehiclename));
            format(coordsstring, sizeof(coordsstring), "Car2: %d | Gold: %d | VIP Level: %d |",carkey2, GoldCoins, viplevel);
            SCM(playerid, COLOR_LIGHTBLUE,coordsstring);
        }
    }
}
Whole damn code.
Reply
#2

Change
pawn Код:
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
To
pawn Код:
if(IsPlayerConnected(playerid)||IsPlayerConnected(targetid))
Reply
#3

Change the && to || - Simple

________________________________________
if i helped +rep
Reply
#4

The operators have nothing to do with it. He wants both the player who will see the stats and the player whose stats are displayed to be online.

I found a custom function "GetVehicleName" and that can cause run time error 4 if the player is not in any vehicle.
Also using crashdetect and debug info will give you information about the run time error and the line caused it.
Reply
#5

It just says ''SERVER: Unknown command.'', instead of displaying my stats, with this command only mine should be showed tho. I got a /check command to check other's stats, just so you know :P.
Reply
#6

Run time errors which are caused inside a command will display "SERVER: Unknown command." message. Do what I told you and you will get it fixed.
Reply
#7

[19:52:49] [debug] Run time error 4: "Array index out of bounds"
[19:52:49] [debug] Accessing element at index 29 past array upper bound 9
[19:52:49] [debug] Backtrace:
[19:52:49] [debug] #0 001f7f10 in ?? () from jrp03z.amx
[19:52:49] [debug] #1 00170488 in ?? () from jrp03z.amx
[19:52:49] [debug] #2 00170398 in public @yC_stats () from jrp03z.amx
[19:52:49] [debug] #3 native CallRemoteFunction () from samp-server.exe
[19:52:49] [debug] #4 000191a0 in ?? () from jrp03z.amx
[19:52:49] [debug] #5 000189e4 in ?? () from jrp03z.amx
[19:52:49] [debug] #6 00007b5c in public OnPlayerCommandText () from jrp03z.amx
Reply
#8

Compile with debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info

so the first 2 of the amx backtrace might get shown. Although, I found the mistake:
pawn Код:
f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName];
FamilyInfo has size of 10 (0-9 the valid indexes). PlayerInfo[targetid][pFMember] is 29 and it exceeds the bounds. You can prevent it by checking its value:
pawn Код:
if (0 <= PlayerInfo[targetid][pFMember] < sizeof (FamilyInfo))
{
    f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName];
    // if you want to copy a string to another, you shouldn't use '=' but strcat, memcpy or format
}
Reply
#9

Thank you that works!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)