Help,/stats
#1

Hello everyone,
I made this script,but when i type /stats it dosen't show
pawn Код:
public ShowStats(playerid)
{
    new string[128];
    new alevel = PlayerInfo[playerid][pAdminLevel];
    new Cash = PlayerInfo[playerid][pCash];
    new Score = PlayerInfo[playerid][pScore];
    new flights = PlayerInfo[playerid][pFlights];
   
    new pilotrank[20];
    if(PlayerInfo[playerid][pPilot] == 1){ pilotrank = "General Pilot"; }
    else if(PlayerInfo[playerid][pPilot] == 2){ pilotrank = "Co-Pilot"; }
    else if(PlayerInfo[playerid][pPilot] == 3){ pilotrank = "Stewart"; }
   
    new destination[128];
    if(PlayerInfo[playerid][pDestination] == 1){ destination = "Los Santos International Airport"; }
    else if(PlayerInfo[playerid][pDestination] == 2){ destination = "Las Venturas International Airport"; }
    else if(PlayerInfo[playerid][pDestination] == 3){ destination = "San Fierro International Airport"; }
    else if(PlayerInfo[playerid][pDestination] == 4){ destination = "Las Venturas Desert Airport"; }
   
    new atcrank[22];
    if(PlayerInfo[playerid][pAtcPlayer] == 1){ destination = "Lead Atc"; }
    else if(PlayerInfo[playerid][pAtcPlayer] == 2){ destination = "Atc Sergeant"; }

    SendClientMessage(playerid,COLOR_GREEN,"|____________________Your Stats : %s(%d)_____________________|");
    format(string, sizeof(string),"Account Stats: Admin Level:%d    Money:%d    Score:%d",alevel,Cash,Score);
    SendClientMessage(playerid,COLOR_GREEN,string);
    format(string, sizeof(string),"Pilot Stats: Flights:%d  Current Destination:%s  Pilot Rank:%s",flights,destination,pilotrank);
    SendClientMessage(playerid,COLOR_GREEN,string);
    format(string, sizeof(string),"ATC Stats: ATC Rank:%s",atcrank);
    SendClientMessage(playerid,COLOR_GREEN,string);
    return 1;
}
And here is the command:
pawn Код:
if (strcmp(cmd, "/stats", true) == 0)
    {
            if (gPlayerLogged[playerid] != 0)
                {
                    ShowStats(playerid);
                }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not Logged in!");
                return 1;
            }
            return 1;
    }
Reply


Messages In This Thread
Help,/stats - by SkizzoTrick - 03.12.2010, 18:44
Re: Help,/stats - by dice7 - 03.12.2010, 19:24
Re: Help,/stats - by SkizzoTrick - 03.12.2010, 19:41
Re: Help,/stats - by dice7 - 03.12.2010, 19:44
Re: Help,/stats - by whitedragon - 03.12.2010, 19:46
Re: Help,/stats - by SkizzoTrick - 03.12.2010, 19:48
Re: Help,/stats - by SkizzoTrick - 03.12.2010, 20:42

Forum Jump:


Users browsing this thread: 1 Guest(s)