2021-03-01, 10:52 PM
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)
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