CMD:hitlist(playerid, params[]) { #pragma unused params new count = 0; new string[1024]; new fstring[1024]; // new ARank[128]; for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { if(pInfo[i][Placehit] > 0) { format(fstring, sizeof(fstring), "%s(%i) - {FFFF00}%s |", pNameHit(i), i, Comma(pInfo[i][Placehit])); strcat(string, fstring); count++; } } } SendClientMessage(playerid, COLOR_YELLOW, "[__________ HIT LIST __________]"); SendClientMessage(playerid, COLOR_WHITE, string); return 1; }
CMD:hitlist(playerid, params[]) { #pragma unused params new count = 0; new string[1024]; new fstring[1024]; // new ARank[128]; for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { if(pInfo[i][Placehit] > 0) { format(fstring, sizeof(fstring), "%s(%i) - {FFFF00}%s", pNameHit(i), i, Comma(pInfo[i][Placehit])); strcat(string, fstring); count++; } SendClientMessage(playerid, COLOR_YELLOW, "[__________ HIT LIST __________]"); SendClientMessage(playerid, COLOR_WHITE, string); } } return 1; }
CMD:hitlist(playerid, params[])
{
new count = 0,string[1024],fstring[1024];
// new ARank[128];
SendClientMessage(playerid, COLOR_YELLOW, "[__________ HIT LIST __________]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(pInfo[i][Placehit] > 0)
{
format(fstring, sizeof(fstring), "%s(%i) - {FFFF00}%s", pNameHit(i), i, Comma(pInfo[i][Placehit]));
strcat(string, fstring);
count++;
}
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1;
}
CMD:hitlist(playerid, params[])
{
new count = 0,fstring[80];
SendClientMessage(playerid, COLOR_YELLOW, "[__________ HIT LIST __________]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(pInfo[i][Placehit] > 0)
{
format(fstring, sizeof(fstring), "%s(%i) - {FFFF00}$%s", pNameHit(i), i, Comma(pInfo[i][Placehit]));
count++;
SendClientMessage(playerid, COLOR_WHITE, fstring);
}
}
}
if(count == 0) return SendClientMessage(playerid, 0xFF0000FF, "There are currently no players with a hit contract.");
return 1;
}
pawn Код:
|
Sorry, I accidentally put 'string' instead of 'fstring'. I edited my post above, so that should work now.
|