16.12.2010, 15:36
Hi,someone can show me a tutorial on how to do a /stats cmd for dudb?
Thanks.
Thanks.
dcmd_stats(playerid,params[])
{
new Float:x, Float:y, Float:z, Float:health, Float:armor, name[30];
new string[128]; new id; id = strval(params);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, AZUL, "Player nгo conectado");
if(!strlen(params)) return SendClientMessage(playerid, AZUL, "USO: /stats <id>");
{
GetPlayerPos(playerid, x,y,z); GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armor);
GetPlayerName(playerid, name, 30);
format(string,sizeof(string),"Info do id %d: | Health: %d | Armour: %d | Score: %d | Money: %d | Skin: %d | Nome: %s",id,floatround(health),armor,GetPlayerScore(playerid),GetPlayerMoney(playerid),GetPlayerSkin(playerid),name);
SendClientMessage(playerid, AZUL, string);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
}
return 1;
}