[Help]How do i make a jail?
#4

Код:
CMD:cuff(playerid,params[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    	if(GetPlayerClass[playerid] == COP_CLASS)
		{
	    	if(GetPlayerWantedLevel(i) >= 3)
	    	{
	    	    if(GetDistanceBetweenPlayers(playerid,i) <= 2.5)
      			{
 			     	if(sscanf(params,"ud", i)) return SendClientMessage(playerid, -1,"USAGE: /cuff [player id]");
     				SetPlayerSpecialAction(i,24);
					SetPlayerAttachedObject(i, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
					Cuffed[i] = 1;
				}
			}
		}
	}
	return 1;
}
CMD:arrest(playerid, params[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER)
		{
			SendClientMessage(playerid,-1,"You cannot arrest a suspect they are in a vehicle. Get them to exit the vehicle first.");
			return 1;
		}
	    new string[128];
    	if(GetPlayerClass[playerid] == COP_CLASS)
    	{
        	if(GetPlayerWantedLevel(i) >= 3)
        	{
        	    if(Cuffed[i] = 0) return SendClientMessage(playerid, -1, "You Can't Cuff Innocents!");
        	    {
        	        if(sscanf(params,"ud", i)) return SendClientMessage(playerid, -1,"USAGE: /arrest [player id]");
            		GivePlayerMoney(playerid, 3000);
			  		SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
			  		Jailed[i] = 1;
			  		JailTime[i] = 60;
			  		Cuffed[i] = 0;
			  		SetPlayerVirtualWorld(playerid, 10);
					SetPlayerFacingAngle(playerid, 360.0);
			  		SetPlayerInterior(i, 3);
			  		SetPlayerPos(i, 197.5662, 175.4800, 1004.0);
			  		SetPlayerWantedLevel(i, 0);
			  		SetPlayerHealth(i,99999);
			  		ResetPlayerWeapons(i);
			  		format(string,sizeof(string),"Police Officer %s(%d) Has arrested wanted suspect %s(%d).",GetNamee(playerid),playerid,GetNamee(i),i);
			  		SendClientMessageToAll(COLOR_ORANGE,string);
			  		return 1;
			  	}
			}
    	}
   }
	return 1;
}
Reply


Messages In This Thread
[Help]How do i make a jail? - by TheKnown - 18.09.2015, 18:09
Re: [Help]How do i make a jail? - by Mister0 - 18.09.2015, 18:19
Re: [Help]How do i make a jail? - by jlalt - 18.09.2015, 18:22
Re: [Help]How do i make a jail? - by TheKnown - 18.09.2015, 18:56
Re: [Help]How do i make a jail? - by Mister0 - 18.09.2015, 19:06
Re: [Help]How do i make a jail? - by TheKnown - 18.09.2015, 19:19
Re: [Help]How do i make a jail? - by JordanZaundd - 18.09.2015, 19:26
Re: [Help]How do i make a jail? - by TheKnown - 18.09.2015, 19:27
Re: [Help]How do i make a jail? - by Mister0 - 18.09.2015, 19:27
Re: [Help]How do i make a jail? - by TheKnown - 18.09.2015, 19:36

Forum Jump:


Users browsing this thread: 1 Guest(s)