stats Command
#9

Opah

pawn Код:
CMD:stats(playerid,params[])
{
    new targetid;
    new    name[MAX_PLAYER_NAME],string[190];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,COLOR_GREY,"Syntax: /stats [playerid]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,COLOR_RED,"Player is not online");
    format(string, sizeof(string), "[------------------------------ %s ------------------------------]",name);
    SendClientMessage(playerid,COLOR_GREEN,string);
    format(string, sizeof(string), "Kills : %d     Deaths : %d     Suicides : %d     Ratio : %.f",pInfo[targetid][Kills],pInfo[targetid][Deaths],pInfo[targetid][Suicides],pInfo[targetid][Kills]/pInfo[targetid][Deaths]);
    SendClientMessage(playerid,COLOR_RED,string);
    format(string, sizeof(string), "Money : %i      Score : %d     Rank : %d",pInfo[targetid][Money],pInfo[targetid][Scores],pInfo[targetid][Rank]+1);
    SendClientMessage(playerid,COLOR_RED,string);
    format(string, sizeof(string), "Play Time : %d Hours, %d Minutes, %d Seconds .",pInfo[targetid][Hour],pInfo[targetid][Min],pInfo[targetid][Sec]);
    SendClientMessage(playerid,COLOR_RED,string);
    format(string, sizeof(string), "Admin : %s     Admin Level : %d",pInfo[targetid][AdminLevel]?("Yes"):("No"),pInfo[targetid][AdminLevel]);
    SendClientMessage(playerid,COLOR_RED,string);
    format(string, sizeof(string), "VIP : %s     VIP Level : %d",pInfo[targetid][VIPLevel]?("Yes"):("No"),pInfo[targetid][VIPLevel]);
    SendClientMessage(playerid,COLOR_RED,string);
    return 1;
}
here is the right one
Reply


Messages In This Thread
stats Command - by Opah - 17.01.2014, 02:02
Re: stats Command - by WantedBot - 17.01.2014, 02:11
Re: stats Command - by Excelize - 17.01.2014, 02:30
Re: stats Command - by Snir_sofer - 17.01.2014, 02:38
Re: stats Command - by Opah - 17.01.2014, 20:36
Re: stats Command - by Opah - 17.01.2014, 20:40
Re: stats Command - by donhu789 - 21.01.2014, 01:21
Re: stats Command - by Opah - 22.01.2014, 03:58
Re: stats Command - by donhu789 - 26.01.2014, 06:14

Forum Jump:


Users browsing this thread: 1 Guest(s)