12.07.2012, 02:25
This is the code
I can do /hitlist and see who has a hit on them, but it still says SERVER: INVALID COMMAND TYPE /CMDS FOR COMMANDS!
pawn Код:
if(!strcmp(cmdtext, "/hitlist", true))
{
new count = 0;
SendClientMessage(playerid, COLOR_MSG, "Listing currently placed hits:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && hit[i] > 0)
{
new string[256];
format(string, 256, "Hit on %s (%i) for $%i", ReturnPlayerName(i), i, hit[i]);
SendClientMessage(playerid, COLOR_FOUND, string);
count++;
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "No hits placed at this time!");
}
}