• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] CMD /id
#1
Espa?ol:?Tengo un problema con este comando, cuando uso /id aparece el id del jugador y otros datos (ping, fps, pk), tambi?n aparece la hora y fecha, el problema es que aveces muestra solo la hora y fecha y otras veces muestra la id y los otros datos (ping, fps, pk)



English: I have a problem with this command, when I use / id it shows the id of the player and other data (ping, fps, pk), it also shows the time and date, the problem is that sometimes it shows only the time and date and other times it shows the id and the other data (ping, fps, pk)



Code:
CMD:id(playerid,params[])

{

new jugador;

if(sscanf(params, "r", jugador)) return SendClientMessage(playerid, -1, "Usa: /id [ID/Nombre]");

if (!IsPlayerConnected(jugador)) return SendClientMessage(playerid,GRIS,"No se encontr? ning?n jugador");

new Float:pPacket = GetPlayerPacketLoss(jugador);

new string[200];

format(string,sizeof(string), "Nombre:?%s ID:?%d FPS: %d Ping: %d | PacketLoss:?%.1f%%",Nombre(jugador),jugador,FPS[jugador],GetPlayerPing(jugador),pPacket);

SendClientMessage(playerid,0xffffffff,string);

new hora,minuto,segundo,d,m,a;

getdate(a, m, d);

gettime(hora, minuto,segundo);

new string2[200];

format(string2,sizeof(string2), "Hora: %d:%d:%d Fecha: %d/%d/%d",hora,minuto,segundo,d,m,a);

SendClientMessage(playerid,0xffffffff,string2);

return 1;

}
Programador b?sico

  Reply
#2
I'd really help you, but I don't understand anything from google-translate
  Reply
#3
(2021-03-01, 10:52 PM)Hitler Wrote: Espa?ol:?Tengo un problema con este comando, cuando uso /id aparece el id del jugador y otros datos (ping, fps, pk), tambi?n aparece la hora y fecha, el problema es que aveces muestra solo la hora y fecha y otras veces muestra la id y los otros datos (ping, fps, pk)

English: I have a problem with this command, when I use / id it shows the id of the player and other data (ping, fps, pk), it also shows the time and date, the problem is that sometimes it shows only the time and date and other times it shows the id and the other data (ping, fps, pk)

Code:
CMD:id(playerid,params[])
{
new jugador;
if(sscanf(params, "r", jugador)) return SendClientMessage(playerid, -1, "Usa: /id [ID/Nombre]");
if (!IsPlayerConnected(jugador)) return SendClientMessage(playerid,GRIS,"No se encontr? ning?n jugador");
new Float:pPacket = GetPlayerPacketLoss(jugador);
new string[200];
format(string,sizeof(string), "Nombre:?%s ID:?%d FPS: %d Ping: %d | PacketLoss:?%.1f%%",Nombre(jugador),jugador,FPS[jugador],GetPlayerPing(jugador),pPacket);
SendClientMessage(playerid,0xffffffff,string);
new hora,minuto,segundo,d,m,a;
getdate(a, m, d);
gettime(hora, minuto,segundo);
new string2[200];
format(string2,sizeof(string2), "Hora: %d:%d:%d Fecha: %d/%d/%d",hora,minuto,segundo,d,m,a);
SendClientMessage(playerid,0xffffffff,string2);
return 1;
}

Where do you define "Nombre"? try using getplayername(jugador, dest, len); and type in the dest as the first param instead of "Nombre(jugador)"

EDIT: also checking if(jugador==INVALID_PLAYER_ID) return ... might help
  Reply
#4
PHP Code:
CMD:id(playeridparams[]) {

new 
jugador;

if (
sscanf(params"r"jugador)) return SendClientMessage(playerid, -1"Usa: /id [ID/Nombre]");

if (!
IsPlayerConnected(jugador)) return SendClientMessage(playeridGRIS"No se encontr? ning?n jugador");

new 
string[144], horaminutosegundodma;

? ? ? ? 
getdate(amd);

gettime(horaminutosegundo);

format(stringsizeof(string), "Nombre: %s ID: %d FPS: %d Ping: %d | PacketLoss: %.2f%%"Nombre(jugador), jugadorFPS[jugador], GetPlayerPing(jugador), GetPlayerPacketLoss(jugador));

SendClientMessage(playerid, -1string);

format(stringsizeof(string), "Hora: %d:%d:%d Fecha: %d/%d/%d"horaminutosegundodma);

SendClientMessage(playerid, -1string);

return 
1;


  Reply
#5
From where did you get FPS plugin?
  Reply
#6
(2021-03-10, 04:25 PM)Fiame Wrote: From where did you get FPS plugin?



you can get the player?s FPS by DrunkLevel at OnPlayerUpdate
  Reply


Forum Jump: