17.01.2014, 02:02
I Was Trying To Create A Stats Command but when i type /stats it gives me the message that it is an unknown command
pawn Код:
CMD:stats(playerid,params[])
{
new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,MAX_PLAYER_NAME);
new isadmin[10],isvip[10];
if(pInfo[playerid][AdminLevel] == 0){format(isadmin,10,"No");}else{format(isadmin,10,"Yes");}
if(pInfo[playerid][VIPLevel] == 0){format(isvip,10,"No");}else{format(isvip,10,"Yes");}
new line1[128];format(line1,128,"[------------------------------ %s ------------------------------]",name);
new line2[128];format(line2,128,"Kills : %i Deaths : %i Suicides : %i Ratio : %i",pInfo[playerid][Kills],pInfo[playerid][Deaths],pInfo[playerid][Suicides],pInfo[playerid][Kills]/pInfo[playerid][Deaths]);
new line3[128];format(line3,128,"Money : %i Score : %i Rank : %i",pInfo[playerid][Money],pInfo[playerid][Scores],pInfo[playerid][Rank]+1);
new line4[128];format(line4,128,"Play Time : %i Hours, %i Minutes, %i Seconds .",pInfo[playerid][Hour],pInfo[playerid][Min],pInfo[playerid][Sec]);
new line5[125];format(line5,128,"Admin : %s Admin Level : %i",isadmin,pInfo[playerid][AdminLevel]);
new line6[125];format(line6,128,"VIP : %s VIP Level : %i",isvip,pInfo[playerid][VIPLevel]);
SendClientMessage(playerid,COLOR_GREEN,line1);
SendClientMessage(playerid,COLOR_RED,line2);
SendClientMessage(playerid,COLOR_RED,line3);
SendClientMessage(playerid,COLOR_RED,line4);
SendClientMessage(playerid,COLOR_RED,line5);
SendClientMessage(playerid,COLOR_RED,line6);
return 1;
}