Arrest command and Rape command bugged
#1

My arrest command doesn't work, when someone is has a wanted level over 3, and I type /arrest ID, i get no response, no text in the chatbox or anything.

ARREST CMD:
Код:
CMD:arrest(playerid, params[])
{
	new string1[200], string2[200], string3[200], CopName[24], CriminalName[24], CriminalID;

	if(gTeam[playerid] != POL && gTeam[playerid] != SECSRV && gTeam[playerid] != ARMY && gTeam[playerid] != SWAT) return SendClientMessage(playerid, COLOR_RED, "You are not a Law Enforcement Officer!");

	if(sscanf(params, "u", CriminalID)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /arrest [ID]");
	if(CriminalID == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot arrest yourself, how is that possible?!");
	if(GetDistanceBetweenPlayers(playerid, CriminalID) > 5)
	{
		if(GetPlayerWantedLevel(CriminalID) >= 3)
		{
	        SetTimerEx("UnjailTimer", 120000, false, "i", CriminalID);

			isJailed[playerid] = 1;

			GetPlayerName(playerid, CopName, 24);
			GetPlayerName(CriminalID, CriminalName, 24);

			format(string1, 200, "Police Officer %s has arrested %s!", CopName, CriminalName);
			format(string2, 200, "You have been arrested by Police Officer %s!", CopName);
			format(string3, 200, "Good job, Officer! You have arrested %s!", CriminalName);

			SendClientMessageToAll(COLOR_YELLOW, string1);
			SendClientMessage(CriminalID, COLOR_ORANGE, string2);
			SendClientMessage(playerid, COLOR_GREEN, string3);
			SendClientMessage(playerid, COLOR_GREEN, "You have earned +3 score and $5000");

			SetPlayerPos(CriminalID, 197.6661,173.8179,1003.0234);
            SetPlayerInterior(CriminalID, 3);

			SetPlayerScore(playerid, GetPlayerScore(playerid)+3);
            GivePlayerMoney(playerid, 5000);
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "That player is not wanted!");
		}
	}
	return 1;
}
For the Rape command, both the rapist and the victim get a disease.

RAPE CMD:
Код:
CMD:rape(playerid, params[])
{
	new string[128], string2[128], string3[128], RapistName[24], VictimName[24], targetid;
	
	if(gTeam[playerid] == POL || gTeam[playerid] == SECSRV || gTeam[playerid] == ARMY || gTeam[playerid] == SWAT) return SendClientMessage(playerid, COLOR_RED, "You are a Law Enforcement Officer, you cannot rape someone!");
	
	if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /rape [ID]");
	{
	    if(GetDistanceBetweenPlayers(playerid, targetid) < 5)
	    {
	        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "That player is not connected.");
	        if(targetid == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot rape yourself!");
	        
	        GetPlayerName(playerid, RapistName, 24);
	        GetPlayerName(targetid, VictimName, 24);
	        
			new rand = random(sizeof(DiseaseNames));
			pInfo[playerid][Diseases] = rand;
			switch(rand)
			{
			    case 0: SendClientMessage(playerid, COLOR_GREY, "You are lucky this time, you didn't get any STDs!");
			    case 1: SendClientMessage(playerid, COLOR_GREY, "You received an HIV. Go to the hospital, quickly to get it cured.");
			    case 2: SendClientMessage(playerid, COLOR_GREY, "You received Syphilis. Go to the hospital, quickly to get it cured.");
			    case 3: SendClientMessage(playerid, COLOR_GREY, "You received the Crazy Chicken Flu. Go to the hospital, quickly to get it cured.");
			    case 4: SendClientMessage(playerid, COLOR_GREY, "You received Mad Cow Disease. Go to the hospital, quickly to get it cured.");
			}
			
			format(string, 128, "You raped %s and gave him %s!", VictimName, DiseaseNames[rand]);
			format(string2, 128, "%s has raped you and given you %s!",RapistName, DiseaseNames[rand]);
			format(string3, 128, "%s has raped %s and infected him with %s!", RapistName, VictimName, DiseaseNames[rand]);
			
			SendClientMessage(playerid, COLOR_PINK, string);
			SendClientMessage(targetid, COLOR_ORANGE, string2);
			SendClientMessageToAll(COLOR_YELLOW, string3);
		}
	}
	return 1;
}
Reply


Messages In This Thread
Arrest command and Rape command bugged - by NoahF - 06.07.2014, 18:00
Re : Arrest command and Rape command bugged - by Noliax8 - 06.07.2014, 18:24
Re: Arrest command and Rape command bugged - by NoahF - 06.07.2014, 21:41
Re: Arrest command and Rape command bugged - by NoahF - 07.07.2014, 16:23
Re: Arrest command and Rape command bugged - by Ihateyou - 07.07.2014, 16:24
Re: Arrest command and Rape command bugged - by awsomedude - 07.07.2014, 16:30
Re: Arrest command and Rape command bugged - by NoahF - 07.07.2014, 16:33
Re: Arrest command and Rape command bugged - by awsomedude - 07.07.2014, 16:35
Re : Arrest command and Rape command bugged - by Clad - 07.07.2014, 16:37

Forum Jump:


Users browsing this thread: 1 Guest(s)