03.12.2010, 18:44
Hello everyone,
I made this script,but when i type /stats it dosen't show
And here is the command:
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;
}
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;
}