18.10.2009, 22:31
Код:
if(strcmp(cmd, "/jail", true) == 0) { if(IsSpawned[playerid] == 0) { SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command"); return 1; } if(gTeam[playerid] != TEAM_COP) { SendClientMessage(playerid,COLOR_ERROR,"Only Police can see who is in Jail"); return 1; } SendClientMessage(playerid, 0xA9A9A9AA, "|_Listing Players Currently In Jail_|"); new jailedresult =0; for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && Jailed[i] == 1 ) { jailedresult ++; new prisoner[30]; GetPlayerName(i,jailbirdname,30); format(string, sizeof(string), "%s(%d) Is in jail at Police Department HQ. Time Left: %d Seconds",prisoner,i,JailTime[i]); SendClientMessage(playerid, 0x00C7FFAA, string); } } if(jailedresult == 0) { SendClientMessage(playerid, 0x00C7FFAA, "There jail cells are empty. No players are in jail"); } return 1; }