Arrest cmd.Help... +1 rep
#5

Код:
COMMAND:arrest(playerid, params[])
{
	if(PlayerInfo[playerid][pCop] == 1)
	{
		new targetid;
		if(!sscanf(params, "u", targetid))
		{
		    if(PlayerInfo[targetid][pWanted] >= 1)
		    {
		        new Float:targetX, Float:targetY, Float:targetZ;
		        GetPlayerPos(targetid, targetX, targetY, targetZ);
				if(IsPlayerInRangeOfPoint(playerid, 5, targetX, targetY, targetZ))
				{
				    if(PlayerInfo[targetid][pCuffed] == 1)
				    {
				        if(IsPlayerInRangeOfPoint(playerid, 5, //the pos for the LSPD garage or whatever...))
				        {
				            SetPlayerPos(targetid, //pos for the jail);
				            //OPTIONAL: SetPlayerColor(targetid, colorForJailedPeople);
				            PlayerInfo[targetid][pJailed] = 1;
				        }
				    }
				}
		    }
		}
	}
	return 1;
}
NOTE: for this, you need to learn about Enums, and set an enum for pCuffed, pJailed, pCop...
Good luck!
Also, you need ZCMD, and SSCANF2.
Reply


Messages In This Thread
Arrest cmd.Help... +1 rep - by jimis - 01.06.2012, 08:56
Re: Arrest cmd.Help... +1 rep - by milanosie - 01.06.2012, 08:58
Re: Arrest cmd.Help... +1 rep - by jimis - 01.06.2012, 09:17
Re: Arrest cmd.Help... +1 rep - by Jochemd - 01.06.2012, 09:34
Re: Arrest cmd.Help... +1 rep - by Sandiel - 01.06.2012, 12:15
Re: Arrest cmd.Help... +1 rep - by milanosie - 01.06.2012, 12:15
Re: Arrest cmd.Help... +1 rep - by Sandiel - 01.06.2012, 12:22

Forum Jump:


Users browsing this thread: 2 Guest(s)