dcmd_whois(playerid, params[])
{
new index = 0;
new playermoney;
new PlayerIP[16];
GetPlayerIp(giveplayerid,PlayerIP,sizeof(PlayerIP));
new Float:pHealth,Float:pArmour;
GetPlayerHealth(playerid,pHealth);
GetPlayerArmour(playerid,pArmour);
tmp2 = strtok(params, index);
if (pInfo[playerid][pAdmin] < 1)
{
SystemMessage(playerid, "You are not an Administrator with the required level.");
return 1;
}
if(!strlen(tmp2))
{
SystemMessage(playerid, "[USAGE] ''/whois [playername/id]''.");
return 1;
}
new string[MAX_STRING];
giveplayerid = ReturnUser(tmp2);
if (IsPlayerConnected(giveplayerid))
{
playermoney = GetPlayerMoney(giveplayerid);
format(string, sizeof(string), "| Name: %s | ID: %d | Money: $%d | IP: %s | Health: %f | Armour: %f", PlayerName(giveplayerid), giveplayerid, playermoney, PlayerIP, pHealth, pArmour);
SystemMessage(playerid, string);
}
else
{
format(string, sizeof(string), "That player is not active.");
SystemMessage(playerid, string);
}
return 1;
}
dcmd_whois(playerid, params[])
{
new index;
new playermoney;
if(!strlen(params))
{
SystemMessage(playerid, "[USAGE] ''/whois [playername/id]''.");
return 1;
}
giveplayerid = ReturnUser(params);
new PlayerIP[16];
GetPlayerIp(giveplayerid,PlayerIP,sizeof(PlayerIP));
new Float:pHealth,Float:pArmour;
GetPlayerHealth(giveplayerid,pHealth);
GetPlayerArmour(giveplayerid,pArmour);
if (pInfo[playerid][pAdmin] < 1)
{
SystemMessage(playerid, "You are not an Administrator with the required level.");
return 1;
}
new string[MAX_STRING];
if (IsPlayerConnected(giveplayerid))
{
playermoney = GetPlayerMoney(giveplayerid);
format(string, sizeof(string), "| Name: %s | ID: %d | Money: $%d | IP: %s | Health: %.1f | Armour: %.1f", PlayerName(giveplayerid), giveplayerid, playermoney, PlayerIP, pHealth, pArmour);
SystemMessage(playerid, string);
}
else
{
format(string, sizeof(string), "That player is not active.");
SystemMessage(playerid, string);
}
return 1;
}
dcmd_whois(playerid, params[])
{
new playermoney;
if(!strlen(params))
{
SystemMessage(playerid, "[USAGE] ''/whois [playername/id]''.");
return 1;
}
giveplayerid = ReturnUser(params);
new Float:pWeapons
GetPlayerWeapons(giveplayerid, pWeapons);
new Float:pHealth,Float:pArmour;
GetPlayerHealth(giveplayerid,pHealth);
GetPlayerArmour(giveplayerid,pArmour);
new PlayerIP[16];
GetPlayerIp(giveplayerid,PlayerIP,sizeof(PlayerIP));
if (pInfo[playerid][pAdmin] < 1)
{
SystemMessage(playerid, "You are not an Administrator with the required level.");
return 1;
}
new string[MAX_STRING];
if (IsPlayerConnected(giveplayerid))
{
playermoney = GetPlayerMoney(giveplayerid);
format(string, sizeof(string), "Name: %s | ID: %d | Money: $%d | Weapon(s): | Health: %.1f | Armour: %.1f | IP: %s ", PlayerName(giveplayerid), giveplayerid, playermoney,, pWeapons, pHealth, pArmour, PlayerIP);
SystemMessage(playerid, string);
}
else
{
format(string, sizeof(string), "That player is not active.");
SystemMessage(playerid, string);
}
return 1;
}
Originally Posted by ¤Adas¤
|
Originally Posted by ¤Adas¤
I think, it is useless to write all player's weapon data in this command. Let there be GetPlayerWeapon for the beginning.
|
Originally Posted by DarkPhoenix
Quote:
|
Originally Posted by ¤Adas¤
Quote:
|
dcmd_whois(playerid, params[])
{
new playermoney;
if(!strlen(params))
{
SystemMessage(playerid, "[USAGE] ''/whois [playername/id]''.");
return 1;
}
giveplayerid = ReturnUser(params);
new Float:pWeapons
GetPlayerWeapons(giveplayerid, pWeapons);
new Float:pHealth,Float:pArmour;
GetPlayerHealth(giveplayerid,pHealth);
GetPlayerArmour(giveplayerid,pArmour);
new PlayerIP[16];
GetPlayerIp(giveplayerid,PlayerIP,sizeof(PlayerIP));
if (pInfo[playerid][pAdmin] < 1)
{
SystemMessage(playerid, "You are not an Administrator with the required level.");
return 1;
}
new string[MAX_STRING];
if (IsPlayerConnected(giveplayerid))
{
playermoney = GetPlayerMoney(giveplayerid);
format(string, sizeof(string), "Name: %s | ID: %d | Money: $%d | Weapon(s): | Health: %.1f | Armour: %.1f | IP: %s ", PlayerName(giveplayerid), giveplayerid, playermoney,, pWeapons, pHealth, pArmour, PlayerIP);
SystemMessage(playerid, string);
}
else
{
format(string, sizeof(string), "That player is not active.");
SystemMessage(playerid, string);
}
return 1;
}