Help with command /jaillist
#5

Код:
	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;
  }
This is example it has to fit your script
Reply


Messages In This Thread
Help with command /jaillist - by tunetu - 13.10.2009, 14:37
Re: Help with command /jailtime - by dice7 - 13.10.2009, 14:48
Re: Help with command /jailtime - by tunetu - 13.10.2009, 15:29
Re: Help with command /jailtime - by tunetu - 13.10.2009, 15:55
Re: Help with command /jaillist - by kman - 18.10.2009, 22:31

Forum Jump:


Users browsing this thread: 1 Guest(s)