SA-MP Forums Archive
/stats cmd with dudb? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /stats cmd with dudb? (/showthread.php?tid=199769)



/stats cmd with dudb? - Face9000 - 16.12.2010

Hi,someone can show me a tutorial on how to do a /stats cmd for dudb?

Thanks.


Re: /stats cmd with dudb? - blackwave - 16.12.2010

Why dont use dini? it's pretty easier... Look at the code which I do use:
pawn Код:
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;
}

It's for player stats, and nothing to do with dini or dudb, cause things are already loaded.