05.09.2012, 18:34
hi all
here in my code
How can i make this then type /stats to show me text no number i have 3 rangs Soldier, General, Marshal how can man to show them
here in my code
PHP код:
CMD:stats(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
StatsShow(playerid,playerid);
}
return 1;}
public StatsShow(playerid,targedid)
{
new a = PlayerInfo[playerid][Pass];
new b = PlayerInfo[playerid][Cash];
new c = PlayerInfo[playerid][Admin];
new d = PlayerInfo[playerid][Kills];
new e = PlayerInfo[playerid][Deaths];
new f = PlayerInfo[playerid][Xp];
new g = PlayerInfo[playerid][Infect];
new h = PlayerInfo[playerid][Rank];
new i = PlayerInfo[playerid][Mute];
new pName[MAX_PLAYER_NAME];
GetPlayerName(targedid, pName, sizeof(pName));
new message[128];
new message2[128];
new message3[128];
new message4[128];
format (message, sizeof(message), "Player:%s || Password:%i || Cash:%i",pName, a , b );
format (message2, sizeof(message2), "Admin Level:%i || Kills:%i || Deaths:%i",c, d , e );
format (message3, sizeof(message3), "XP Points:%i || Infected:%i || Rank:%i",f, g , h );
format (message4, sizeof(message4), "Muted:%i",i );
SendClientMessage(playerid, white, "Player Stats");
SendClientMessage(playerid, aqua, message);
SendClientMessage(playerid, aqua, message2);
SendClientMessage(playerid, aqua, message3);
SendClientMessage(playerid, aqua, message4);
return 1;}