15.05.2012, 12:03
Hi
I try to make /stats command it succes but when i show to player it show
Health = 121532562
without decimal point i mean like that
Health = 121.532562
How could i fix that ?
Here is the Code
I try to make /stats command it succes but when i show to player it show
Health = 121532562
without decimal point i mean like that
Health = 121.532562
How could i fix that ?
Here is the Code
pawn Код:
new Float:H,Float:A,targetid,targetname[MAX_PLAYER_NAME],str[120],str1[120],str2[120];
if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/stats "WHITE"[playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid PlayerID"RED"(Player Not Connected)!");
GetPlayerHealth(playerid, H);
GetPlayerArmour(playerid, A);
GetPlayerTeam(targetid);
GetPlayerName(targetid,targetname,sizeof(targetname));
format(str,sizeof(str),"This Player Called %s",targetname);
format(str1,sizeof(str1),""WHITE"Health = "RED"%d",H);
format(str2,sizeof(str2),""WHITE"Armour = "RED"%d",A);
SendClientMessage(playerid,COLOR_RED,str);
SendClientMessage(playerid,COLOR_RED,str1);
SendClientMessage(playerid,COLOR_RED,str2);