arrest
#1

hey guys can someone help me with arrest cmd

this is the script
Код:
dcmd_arrest(playerid,params[])
{
	new string[128];
	new ID;
	if(sscanf(params, "u", ID))
	{
	    SendClientMessage(playerid,COLOR_ERROR,"USAGE: /arrest (Player Name/ID)");
	    return 1;
	}
    if(IsSpawned[playerid] != 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
	    return 1;
	}
	if(IsKidnapped[playerid] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You are kidnapped. You cannot use this command.");
	    return 1;
	}
	if(IsFrozen[playerid] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You have been frozen by a Server Administrator. You cannot use this command.");
	    return 1;
	}
	if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"Only law enforcement can arrest wanted suspects.");
	    return 1;
	}
	if(!IsPlayerConnected(ID))
	{
	    format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot arrest them.",ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(GetDistanceBetweenPlayers(playerid,ID) > 4)
	{
	    format(string,sizeof(string),"%s(%d) is too far away. You cannot reach him to arrest him.",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(IsCuffed[ID] == 0)
	{
	    format(string,sizeof(string),"%s(%d) is not cuffed. You have to place the suspect in cuffs before attempted to arrest them.",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest a suspect while in a vehicle. Exit the vehicle first.");
	    return 1;
	}
	if(GetPlayerState(ID) == PLAYER_STATE_DRIVER || GetPlayerState(ID) == PLAYER_STATE_PASSENGER)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest a suspect they are in a vehicle. Get them to exit the vehicle first.");
	    return 1;
	}
	if(InAdminMode[ID] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command on this player because they are in Administrator mode.");
	    return 1;
	}
	if(playerid == ID)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest yourself, why would you do that anyway?");
	    return 1;
	}
	if(IsSpawned[ID] != 1)
	{
	    format(string,sizeof(string),"%s(%d) is not spawned. You arrest dead people ..",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(IsFrozen[ID] == 1)
	{
	    format(string,sizeof(string),"%s(%d) is frozen by a Server Administrator. You cannot arrest them.",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(GetDistanceBetweenPlayers(playerid,ID) <= 4)
	{
		SendClientMessage(ID,COLOR_DEADCONNECT,"[[_Arrested_]]");
		format(string,sizeof(string),"You have been sent to Las Venturas Prison by Law Enforcement Officer %s(%d)",PlayerName(playerid),playerid);
		SendClientMessage(ID,COLOR_LIGHTBLUE,string);

		//Give the Police Officer Reward
		IncreasePlayerScore(playerid,2);

		//Show the jail TextDraw for suspect
		TextDrawShowForPlayer(ID,JailTimer[ID]);

		//Others
		ResetPlayerWeapons(ID);

		//Send the suspect to jail
		if(GetPlayerWantedLevel(ID) >= 4 && GetPlayerWantedLevel(ID) <= 10)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the low wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the low wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

			//Give the police officer reward
		    format(string,sizeof(string),"You have recieved $223 for sending the low wanted suspect %s(%d) to prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,223);

			new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =180;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =180;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 11 && GetPlayerWantedLevel(ID) <= 19)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $981 for sending the wanted suspect %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,981);

		    new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =250;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =250;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 20 && GetPlayerWantedLevel(ID) <= 29)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $2412 for sending the wanted suspect %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,2412);

		    new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =340;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =340;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 30 && GetPlayerWantedLevel(ID) <= 39)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the most wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the most wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $3821 for sending the most wanted suspect %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,3821);

		    new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =400;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =400;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 40)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the maniac %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the maniac %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $5212 for sending the maniac %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,5212);

		    new rnd = random(sizeof(JailSpawnPoints));
			JailTime[ID] =500;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =500;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		return 1;
	}
	return 1;
}
and how change dcmd to an CMD becusse i got an error dcmd never used please help me

please help me how to do?
Reply
#2

and where to add skins only that guys can do??
Reply
#3

Do you want to switch to ZCMD ?
Reply
#4

My friend i will help you here is the Code!

Link to ZCDM include: ZCMD

Код:
CMD:arrest(playerid,params[])
{
	new string[128];
	new ID;
	if(sscanf(params, "u", ID))
	{
	    SendClientMessage(playerid,COLOR_ERROR,"USAGE: /arrest (Player Name/ID)");
	    return 1;
	}
    if(IsSpawned[playerid] != 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
	    return 1;
	}
	if(IsKidnapped[playerid] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You are kidnapped. You cannot use this command.");
	    return 1;
	}
	if(IsFrozen[playerid] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You have been frozen by a Server Administrator. You cannot use this command.");
	    return 1;
	}
	if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"Only law enforcement can arrest wanted suspects.");
	    return 1;
	}
	if(!IsPlayerConnected(ID))
	{
	    format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot arrest them.",ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(GetDistanceBetweenPlayers(playerid,ID) > 4)
	{
	    format(string,sizeof(string),"%s(%d) is too far away. You cannot reach him to arrest him.",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(IsCuffed[ID] == 0)
	{
	    format(string,sizeof(string),"%s(%d) is not cuffed. You have to place the suspect in cuffs before attempted to arrest them.",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest a suspect while in a vehicle. Exit the vehicle first.");
	    return 1;
	}
	if(GetPlayerState(ID) == PLAYER_STATE_DRIVER || GetPlayerState(ID) == PLAYER_STATE_PASSENGER)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest a suspect they are in a vehicle. Get them to exit the vehicle first.");
	    return 1;
	}
	if(InAdminMode[ID] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command on this player because they are in Administrator mode.");
	    return 1;
	}
	if(playerid == ID)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest yourself, why would you do that anyway?");
	    return 1;
	}
	if(IsSpawned[ID] != 1)
	{
	    format(string,sizeof(string),"%s(%d) is not spawned. You arrest dead people ..",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(IsFrozen[ID] == 1)
	{
	    format(string,sizeof(string),"%s(%d) is frozen by a Server Administrator. You cannot arrest them.",PlayerName(ID),ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(GetDistanceBetweenPlayers(playerid,ID) <= 4)
	{
		SendClientMessage(ID,COLOR_DEADCONNECT,"[[_Arrested_]]");
		format(string,sizeof(string),"You have been sent to Las Venturas Prison by Law Enforcement Officer %s(%d)",PlayerName(playerid),playerid);
		SendClientMessage(ID,COLOR_LIGHTBLUE,string);

		//Give the Police Officer Reward
		IncreasePlayerScore(playerid,2);

		//Show the jail TextDraw for suspect
		TextDrawShowForPlayer(ID,JailTimer[ID]);

		//Others
		ResetPlayerWeapons(ID);

		//Send the suspect to jail
		if(GetPlayerWantedLevel(ID) >= 4 && GetPlayerWantedLevel(ID) <= 10)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the low wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the low wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

			//Give the police officer reward
		    format(string,sizeof(string),"You have recieved $223 for sending the low wanted suspect %s(%d) to prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,223);

			new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =180;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =180;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 11 && GetPlayerWantedLevel(ID) <= 19)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $981 for sending the wanted suspect %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,981);

		    new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =250;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =250;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 20 && GetPlayerWantedLevel(ID) <= 29)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $2412 for sending the wanted suspect %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,2412);

		    new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =340;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =340;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 30 && GetPlayerWantedLevel(ID) <= 39)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the most wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the most wanted suspect %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $3821 for sending the most wanted suspect %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,3821);

		    new rnd = random(sizeof(JailSpawnPoints));
		    JailTime[ID] =400;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =400;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		if(GetPlayerWantedLevel(ID) >= 40)
		{
		    format(string,sizeof(string),"[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the maniac %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    SendClientMessageToAll(COLOR_ORANGE,string);
		    format(string,sizeof(string),"7[POLICE ACTION] Law Enforcement Officer %s(%d) has sent the maniac %s(%d) to Las Venturas Prison.",PlayerName(playerid),playerid,PlayerName(ID),ID);
		    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

		    //Give the police officer reward
		    format(string,sizeof(string),"You have recieved $5212 for sending the maniac %s(%d) to Las Venturas prison.",PlayerName(ID),ID);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
			GivePlayerMoney(playerid,5212);

		    new rnd = random(sizeof(JailSpawnPoints));
			JailTime[ID] =500;
		    IsCuffed[ID] =0;
		    CuffTime[ID] =0;
		    TotalJailTime[ID] =500;
		    SetPlayerInterior(ID,10);
		    SetPlayerPos(ID,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]);
		    SetPlayerFacingAngle(ID,JailSpawnPoints[rnd][3]);
		    TogglePlayerControllable(ID,1);
		    StopLoopingAnim(ID);
		    SetPlayerWantedLevel(ID,0);
		    SetPlayerToTeamColour(ID);
		    return 1;
		}
		return 1;
	}
	return 1;
}
Reply
#5

pawn Код:
dcmd_arrest(playerid,params[])
To :

pawn Код:
CMD:arrest(playerid, params[])
Download ZCMD : https://sampforum.blast.hk/showthread.php?tid=91354

Don't forget to add
pawn Код:
#include <zcmd>
On the top of your gamemode.
Reply
#6

i got any thing but i need define this but how and some errors
Quote:

C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(47) : error 017: undefined symbol "COLOR_ERROR"
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(50) : error 017: undefined symbol "IsSpawned"
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(50) : warning 215: expression has no effect
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(50) : error 001: expected token: ";", but found "]"
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(50) : error 029: invalid expression, assumed zero
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(50) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

Reply
#7

You have to define the color on the top of your script.

pawn Код:
#define COLOR_ERROR 0xFFFFFFFF // Replace "0xFFFFFFFF" with your color code
Show us error lines. (Command or callback)
Reply
#8

Quote:

if(IsSpawned[playerid] != 1)

i think it go the hole script??

Quote:

C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(51) : error 017: undefined symbol "IsSpawned"
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(51) : warning 215: expression has no effect
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(51) : error 001: expected token: ";", but found "]"
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(51) : error 029: invalid expression, assumed zero
C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(51) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

and if i delete this one its go to the other that errors like virus
Reply
#9

Try this:

Код:
if(IsSpawned[playerid] != 1);
If it's not working try this:

Код:
if(IsSpawned[playerid; != 1)
Reply
#10

again the errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)