24.08.2011, 23:55
prueba con estos utilizando zcmd y el include de the_chaoz
eso te deberia de funcionar
pawn Код:
CMD:fps(playerid, params[])//comando para mostrar los fps de una persona en especifico
{
if(!strval(params))return SendClientMessage(playerid,0xFF0000FF,"Error: /fps <Player ID>");
new id = strval(params);
new name[MAX_PLAYER_NAME];
GetPlayerName(id, name, sizeof(name));
new string[128];
format(string, sizeof(string), "Los FPS de %s son: %d", name, GetPlayerFPS(id));
SendClientMessage(playerid,0xFFFFFFFF,string);
return 1;
}
CMD:fpst(playerid, params[])//comando para mostrar los fps de todos
{
new str[2000];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerFPS(i) < 20) format(str, sizeof(str), "%s%s\t\t\t%FPS:{CC0000}[%d]{FFFFFF}\n", str, pName(i), GetPlayerFPS(i));
if(IsPlayerConnected(i) && GetPlayerFPS(i) > 30) format(str, sizeof(str), "%s%s\t\t\t%FPS:{00FF00}[%d]{FFFFFF}\n", str, pName(i), GetPlayerFPS(i));
if(IsPlayerConnected(i) && GetPlayerFPS(i) >= 20 && GetPlayerFPS(i) <= 30) format(str, sizeof(str), "%s%s\t\t\t%FPS:{FFAF00}[%d]{FFFFFF}\n", str, pName(i), GetPlayerFPS(i));
}
ShowPlayerDialog(playerid,0, DIALOG_STYLE_MSGBOX, "{CC0000}Player FPS List", str, "Aceptar","");
return 1;
}
stock pName(playerid)
{
new
iName[MAX_PLAYER_NAME];
GetPlayerName(playerid, iName, sizeof(iName));
return iName;
}