29.01.2016, 14:52
Buenas, estoy tratando de hacer un dialog de estadisticas pero cuando lo pruebo, me sale que es un comando desconocido.
Este es el codigo:
Este es el codigo:
PHP код:
COMMAND:stats(playerid,params[])
{
new idplayer,titstr[100],infstr[1650];
new paisstring[100];
GetPlayerCountry(playerid,paisstring,sizeof(paisstring));
new ligatxt[70];
switch(Player[playerid][Liga])
{
case 0: ligatxt = "Ninguna";
case 1: ligatxt = "Liga de Bronce";
case 2: ligatxt = "Liga de Plata";
case 3: ligatxt = "Liga de Oro";
case 4: ligatxt = "Liga de Cristal";
case 5: ligatxt = "Liga de Maestros";
case 6: ligatxt = "Liga de Campeones";
case 7: ligatxt = "Liga de Titanes";
case 8: ligatxt = "Liga de Leyendas";
}
new Float:pPacket = GetPlayerPacketLoss(playerid);
format(titstr,sizeof(titstr),"{FFFFFF}%s {0ECEF0}Estadisticas",pName(playerid));
format(infstr,sizeof(infstr),"{FFFFFF}%s\n",pName(playerid));
format(infstr,sizeof(infstr),"%s{0ECEF0}Pais: {FFFFFF}%s\n\n",infstr,paisstring);
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}Liga: {FFFFFF}%s\t\t\t",infstr,ligatxt);
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}Asesinatos: {FFFFFF}%d\t\t\t",infstr,Player[playerid][Kills]);
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}FPS: {FFFFFF}%d\n",infstr,GetPlayerFPS(playerid));
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}Trofeos: {FFFFFF}%d\t\t\t\t",infstr,Player[playerid][Trofeos]);
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}Muertes: {FFFFFF}%d\t\t\t\t",infstr,Player[playerid][Deaths]);
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}Ping: {FFFFFF}%d\n",infstr,GetPlayerPing(playerid));
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}Experiencia: {FFFFFF}%d\t\t\t",infstr,Player[playerid][Experiencia]);
format(infstr,sizeof(infstr),"%s{FF6666}- {0ECEF0}KDR: {FFFFFF}%0.2f\t\t\t\t",infstr,Player[playerid][Kills]/Player[playerid][Deaths]);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Packet-Loss: {FFFFFF}%0.2f\n\n",infstr,pPacket);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Hits: {FFFFFF}%d\t\t\t\t",infstr,Player[playerid][TotalHits]);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Duelos Ganados: {FFFFFF}%d\t\t\t",infstr,Player[playerid][DuelosGanados]);
new txtclan[156];
if(Player[playerid][Clan] == 0) txtclan = "Huerfano";
if(Player[playerid][Clan] != 0) txtclan = GetGangName(Player[playerid][Clan]);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Pandilla: {FFFFFF}%s\n",infstr,GetGangName(Player[playerid][Clan]));
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Daсo: {FFFFFF}%d\t\t\t\t",infstr,Player[playerid][TotalDamage]);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Duelos Perdidos: {FFFFFF}%d\t\t\t",infstr,Player[playerid][DuelosPerdidos]);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Rango: {FFFFFF}%s\n",infstr,GetRankName(playerid));
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Arma Preferida: {FFFFFF}Nada\t\t\t",infstr);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Valoraciуn: {FFFFFF}%0.2f\t\t\t",infstr,Player[playerid][DuelosGanados]/Player[playerid][DuelosPerdidos]);
format(infstr,sizeof(infstr),"%s{FF6666}- {FF6666}Reputaciуn: {FFFFFF}%0.2f\t\t\t\t",infstr,pPacket);
if(sscanf(params,"u",idplayer))
{
// strcat(infstr,"",sizeof(infstr));
ShowPlayerDialog(playerid,DIALOGO_STATS,DIALOG_STYLE_MSGBOX,titstr,infstr,"Aceptar","");
}
return 1;
}