if (strcmp(cmd, "/stats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new cash = GetPlayerMoney(playerid);
//new admin = PlayerInfo[playerid][pAdmin];
new level = PlayerInfo[playerid][pLevel];
new exp = PlayerInfo[playerid][pExp];
new gun1 = PlayerInfo[playerid][pGun1];
new gun2 = PlayerInfo[playerid][pGun2];
new gun3 = PlayerInfo[playerid][pGun3];
new gun4 = PlayerInfo[playerid][pGun4];
new gun5 = PlayerInfo[playerid][pGun5];
new gun6 = PlayerInfo[playerid][pGun6];
new ammo1 = PlayerInfo[playerid][pAmmo1];
new ammo2 = PlayerInfo[playerid][pAmmo2];
new ammo3 = PlayerInfo[playerid][pAmmo3];
new ammo4 = PlayerInfo[playerid][pAmmo4];
new ammo5 = PlayerInfo[playerid][pAmmo5];
new ammo6 = PlayerInfo[playerid][pAmmo6];
new kills = PlayerInfo[playerid][pKills];
//new pcb = PlayerInfo[playerid][pCB];
//new phw = PlayerInfo[playerid][pHW];
//new psr = PlayerInfo[playerid][pSR];
//new pwa = PlayerInfo[playerid][pWA] ;
//new ppen = PlayerInfo[playerid][pPEN];
new pnumber = PlayerInfo[playerid][pPnumber];
new account = PlayerInfo[playerid][pAccount];
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new expamount = nxtlevel*levelexp;
//new costlevel = nxtlevel*levelcost;//10k for testing purposes
new housekey = PlayerInfo[playerid][pPhousekey];
new bizkey = PlayerInfo[playerid][pPbiskey];
new intir = PlayerInfo[playerid][pInt];
new local = PlayerInfo[playerid][pLocal];
new Float:shealth = PlayerInfo[playerid][pSHealth];
new Float:health;
new name[MAX_PLAYER_NAME];
new sgun1[20];
new sgun2[20];
new sgun3[20];
new sgun4[20];
new sgun5[20];
new sgun6[20];
GetWeaponName(gun1, sgun1, 20);
GetWeaponName(gun2, sgun2, 20);
GetWeaponName(gun3, sgun3, 20);
GetWeaponName(gun4, sgun4, 20);
GetWeaponName(gun5, sgun5, 20);
GetWeaponName(gun6, sgun6, 20);
GetPlayerName(playerid, name, sizeof(name));
GetPlayerHealth(playerid,health);
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid, px, py, pz);
new coordsstring[256];
SendClientMessage(playerid, COLOR_GREEN,"_________________STATS:%s_________________",name);
format(coordsstring, sizeof(coordsstring), "PlayerLevel: [%d] SpawnHealth: %.1f Cash: [$%d] Bank: [$%d] Ph: [%d]", level, shealth+50, cash, account, pnumber);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Weapons: %s %s %s %s %s %s", sgun1,sgun2,sgun3,sgun4,sgun5,sgun6);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "Ammo1: [%d] Ammo2: [%d] Ammo3: [%d] Ammo4: [%d] Ammo5: [%d] Ammo6: [%d]", ammo1,ammo2,ammo3,ammo4,ammo5,ammo6);
SendClientMessage(playerid, COLOR_GRAD3,coordsstring);
if (stats)
{
format(coordsstring, sizeof(coordsstring), "KILLS/EXP ");
SendClientMessage(playerid, COLOR_GRAD4,coordsstring);
format(coordsstring, sizeof(coordsstring), "Kills: [%d] Exp: [%d/%d]",kills,exp,expamount);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
/*
if(expamount <= exp)
{
SendClientMessage(playerid, COLOR_RED,coordsstring);
}
else
{
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
}*/
}
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
{
format(coordsstring, sizeof(coordsstring), "House key [%d] Business key [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,HireCar[targetid],intir,local);
SendClientMessage(playerid, COLOR_GRAD6,coordsstring);
}
//SendClientMessage(playerid, COLOR_GRAD6,"Hint: use /level <playerid> to see another players stats");
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You are not logged in");
}
}
return 1;
}
Originally Posted by [AC
Etch ]
does it give errors or doesnt work or what?? |
Originally Posted by »Julian™«
I messed up my /stats
|
Originally Posted by [AC
Etch ]
does it give errors or doesnt work or what?? |
Originally Posted by [AC
Etch ]
does it give errors or doesnt work or what?? |
Originally Posted by »Julian™«
Crashes my Pawn
|