actually i made a cmd for /getinfo in that it tells players deaths but it is not telling
pawn Код:
CMD:getinfo(playerid,params[])
{
if(gPlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
new target;
if(sscanf(params, "u", target)) return
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /getinfo [PlayerID] ") &&
SendClientMessage(playerid, COLOR_ORANGE, "Function: Will see Informations of specified player");
new string[128];
if(IsPlayerConnected(target) && target != INVALID_PLAYER_ID)
{
new TimesOn;
new pIP[128];
new Float:pHealth;
new Float:pArmour;
new year,month,day;
new tmp2[256],file[256];
new Float:x,Float:y,Float:z;
new pRegister[4],RegDate[256];
new pJailed[4],pFrozen[4];
new pLogged[4];
GetPlayerArmour(target,pArmour);
GetPlayerHealth(target,pHealth);
GetPlayerIp(target, pIP, sizeof(pIP));
getdate(year, month, day);
GetPlayerPos(target,x,y,z);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), PlayerFile, name);
if(gPlayerInfo[target][Jailed] == 1) pJailed = "Yes"; else pJailed = "No";
if(gPlayerInfo[target][Frozen] == 1) pFrozen = "Yes"; else pFrozen = "No";
if(gPlayerInfo[target][LoggedIn] == 1) pLogged = "Yes"; else pLogged = "No";
if(fexist(file)) pRegister = "Yes"; else pRegister = "No";
tmp2 = dini_Get(file,"Last On:");
RegDate = dini_Get(file,"Registered On:");
GetPlayerName( target,name, sizeof(name));
SendClientMessage(playerid, orange, " ");
SendClientMessage(playerid, orange, "___________ |- Player Information -| ___________");
format(string, sizeof(string),"Name: %s | ID: %d | Ip: %s | Health: %d | Armour: %d | Cash: %d", name, target,pIP,floatround(pHealth),floatround(pArmour),GetPlayerMoney(target));
SendClientMessage(playerid,COLOR_LIGHTGREEN,string);
format(string, sizeof(string),"Score: %d | Skin: %d | Ping: %d| Wanted Level: %d", GetPlayerScore(target),GetPlayerSkin(target),GetPlayerPing(target),GetPlayerWantedLevel(target));
SendClientMessage(playerid,0x33F666FF,string);
format(string, sizeof(string),"Interior: %d | Virtual World: %d | Pos: X: %0.1f, Y: %0.1f, Z: %0.1f |", GetPlayerInterior(target), GetPlayerVirtualWorld(target), Float:x,Float:y,Float:z);
SendClientMessage(playerid,0x53D266FF,string);
format(string, sizeof(string),"Kills: %d | Deaths: %d | Ratio: %0.2f | Admin Level: %d - %s |", gPlayerInfo[target][Kills],gPlayerInfo[target][Deaths],Float:gPlayerInfo[target][Kills]/Float:gPlayerInfo[target][Deaths],gPlayerInfo[target][Level],GetRankFromLevel(target));
SendClientMessage(playerid,0x53D212FF,string);
format(string, sizeof(string),"Registered: %s | Logged In: %s | In Jail: %s | Frozen: %s | On Server: %d",pRegister,pLogged,pJailed,pFrozen,TimesOn);
SendClientMessage(playerid,0x53BB12FF,string);
format(string, sizeof(string),"Last On Server: %s | Register Date: %s | Todays Date: %d/%d/%d",tmp2,RegDate,day,month,year);
SendClientMessage(playerid,0x129E12FF,string);
new slot, ammo, weap, Count, WeapName[24], WeapSTR[128], p; WeapSTR = "Weapons: ";
for (slot = 0; slot < 14; slot++)
{
GetPlayerWeaponData(target, slot, weap, ammo);
if( ammo != 0 && weap != 0)
Count++;
}
if(Count < 1)
return SendClientMessage(playerid,0x6BF686FF,"Player has no weapons");
else
{
for (slot = 0; slot < 14; slot++)
{
GetPlayerWeaponData(target, slot, weap, ammo);
if (ammo > 0 && weap > 0)
{
GetWeaponName(weap, WeapName, sizeof(WeapName) );
if (ammo == 65535 || ammo == 1)
format(WeapSTR,sizeof(WeapSTR),"%s%s (1)",WeapSTR, WeapName);
else format(WeapSTR,sizeof(WeapSTR),"%s%s (%d)",WeapSTR, WeapName, ammo);
p++;
if(p >= 5)
{
SendClientMessage(playerid, 0x6BF686FF, WeapSTR); format(WeapSTR, sizeof(WeapSTR), "Weapons: "); p = 0;
}
else format(WeapSTR, sizeof(WeapSTR), "%s, ", WeapSTR);
}
}
if(p <= 4 && p > 0)
{
string[strlen(string)-3] = '.';
SendClientMessage(playerid, 0x6BF686FF, WeapSTR);
}
}
return 1;
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 7);
}