Deliver Problem please help
#1

When I deliver the suspect it sends him to jail but it releases him again after a second, Does anyone know how to change the jail time?. If you need any other coded just reply

Код:
CMD:deliver(playerid, params[])
{
	if(!IsPlayerInRangeOfPoint(playerid, 8.0, 1991.7953,-2321.2532,13.5469))
	{
		SendClientMessageEx(playerid, COLOR_GREY, "You're not at the Los Santos International Airport.");
		return 1;
	}
	new giveplayerid;
	if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /deliver [playerid]");
	if(PlayerInfo[playerid][pRank] < 1)
	{
		SendClientMessageEx(playerid, COLOR_WHITE, "You must be at least rank 1.");
		return 1;
	}
	if(IsPlayerConnected(giveplayerid))
	{
		if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, "   Can't throw yourself into BlueBerry State Penitentiary.!"); return 1; }
		if(PlayerInfo[giveplayerid][pWantedLevel] > 5 && PlayerInfo[giveplayerid][pJudgeJailType] != 2) { SendClientMessageEx(playerid, COLOR_GREY, "That player doesn't need to be in prison!"); return 1; }
		if(ProxDetectorS(8.0, playerid, giveplayerid))
		{
			new string[37 + MAX_PLAYER_NAME];
			SetPVarInt(giveplayerid, "IsFrozen", 0);
			format(string, sizeof(string), "* You've brought %s to Blueberry State Penitentiary.", GetPlayerNameEx(giveplayerid));
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
			format(string, sizeof(string), "* %s brought you to Blueberry State Penitentiary.", GetPlayerNameEx(playerid));
			SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
			GameTextForPlayer(giveplayerid, "~w~Welcome to ~n~~r~Blueberry State Penitentiary.((/exit to exit cell))", 5000, 3);
			TogglePlayerControllable(giveplayerid, 1);
			ClearAnimations(giveplayerid);
			PlayerCuffed[giveplayerid] = 0;
			SetPVarInt(giveplayerid, "PlayerCuffed", 0);
			format(PlayerInfo[giveplayerid][pPrisonedBy], 24, "%s", GetPlayerNameEx(playerid));
			format(PlayerInfo[giveplayerid][pPrisonReason], 128, "[IC] Judge Sentence");
			WantedPoints[giveplayerid] = 0;
			PlayerInfo[giveplayerid][pWantedLevel] = 0;
			SetPlayerToTeamColor(giveplayerid);
			SetPlayerWantedLevel(giveplayerid, 0);
			SetPlayerSkin(giveplayerid, 50);
			PlayerInfo[giveplayerid][pJailed] = 2;
			PhoneOnline[giveplayerid] = 1;
			PlayerInfo[giveplayerid][pJailTime] = PlayerInfo[giveplayerid][pJudgeJailTime];
			SetPlayerInterior(giveplayerid, 1);
			PlayerInfo[giveplayerid][pInt] = 1;
			SetPlayerSkin(giveplayerid, 50);
			SetPlayerVirtualWorld(giveplayerid, 0);
			PlayerInfo[giveplayerid][pVW] = 0;
			SetPlayerColor(giveplayerid, TEAM_ORANGE_COLOR);
			GameTextForPlayer(giveplayerid, "Objects loading...", 1000, 5);
			SetPVarInt(giveplayerid, "Loading..Interior", 1);
			SetTimerEx("SafeLoadObjects", 4000, 0, "d", giveplayerid);
			new rand = random(sizeof(ICPrisonSpawns));
			Streamer_UpdateEx(giveplayerid, ICPrisonSpawns[rand][0], ICPrisonSpawns[rand][1], ICPrisonSpawns[rand][2]);
			SetPlayerPos(giveplayerid, ICPrisonSpawns[rand][0], ICPrisonSpawns[rand][1], ICPrisonSpawns[rand][2]);
			ResetPlayerWeaponsEx(giveplayerid);
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_GREY, "That player isn't near you.");
			return 1;
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
		return 1;
	}
	return 1;
}
Reply
#2

It most probably has something to do with this line:
pawn Код:
PlayerInfo[giveplayerid][pJailTime] = PlayerInfo[giveplayerid][pJudgeJailTime];
I'd try setting pJailTime to another value, or pJudgeJailTime - but I have no idea how the system works unless I get to see where pJudgeJailTime is used.
Reply
#3

Yeeh i tought that too but I don't see any time values near those. I can show some codes if you need any just need to know what exactly.
Reply
#4

Still up
Reply
#5

Quote:
Originally Posted by William1122
I can show some codes if you need any just need to know what exactly.
Quote:
Originally Posted by LarzI
But I have no idea how the system works unless I get to see where pJudgeJailTime is used.
****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)