09.12.2010, 13:26
this is my bounty script
Код:
if(strcmp(cmd, "/bounties", true) == 0) { // new tmp[256]; new x; SendClientMessage(playerid, COLOR_GREEN, "Current Bounties:"); for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && bounty[i] > 0) { GetPlayerName(i, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "%s%s(%d): $%d", string,giveplayer,i,bounty[i]); x++; if(x > 3) { SendClientMessage(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), ""); } else { format(string, sizeof(string), "%s, ", string); } } } if(x <= 3 && x > 0) { string[strlen(string)-2] = '.'; SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; }