/ar command help pls fast
#1

i had this cmd in strcmp and this worked but now when i do this in zcmd then this doesnt work. Can any pro scripter fix it please? i need it...

Код:
CMD:arr(playerid,params[],help)
{
	new id,string[126];
	new oname[24];
    new pname[24];
    GetPlayerName(playerid,oname, 24);
	GetPlayerName(id, pname, 24);
	if(gTeam[playerid] == TEAM_FBI || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_BOUNTY)
	{
	if(sscanf(params, "u", id)) return SCM(playerid, 0xFF0000FF, "Koristi: /ar [id]");
	if(gTeam[playerid] == TEAM_BOUNTY && EscapedConvict[id] == 1 && GetPlayerWantedLevel(id) >=10)
	{
	SetPlayerInterior(id,10);
	new rnd;
	rnd = random(sizeof (AlcatrazArrestedSpawn));
	SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
	SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
	format(string, sizeof(string), "Bounty Hunter %s(%d) has re-captured Escaped Convict %s(%d) and has sent the suspect to Alcatraz",oname,playerid,pname,id);
	SendClientMessageToAll(0x00C7FFAA, string);

	SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Busted By A Bounty Hunter_|");
	format(string, sizeof(string), "You have been sent to Alcatraz by Bounty Hunter %s(%d)",oname,playerid);
	SendClientMessage(id,0x00C7FFAA, string);
	SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
	SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
	SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
	format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $5000 re-capture bonus",pname,id);
	SendClientMessage(playerid,0x00C7FFAA, string);
	GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
	format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Bounty Hunter %s(%d)",pname,id,oname,playerid);
	printf("%s", string);
	SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
	GivePlayerMoney(playerid,5000);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =320;
	JailTimeServed[id] =0;
	EscapedConvict[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
	SetPlayerScore(playerid, oscore +1);
	}
	else if(GetPlayerWantedLevel(id) >=6 && GetPlayerWantedLevel(id) <=8)
	{
	SetPlayerInterior(id,3);
    new rnd;
    rnd = random(sizeof (ArrestedSpawn));
    SetPlayerPos(id, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, ArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,id,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
    SendClientMessage(id,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have arrested %s(%d) - you receive a $2000 bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,2000);
	Jailed[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =140;
	JailTimeServed[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
   	}
	else if(GetPlayerWantedLevel(id) == 9)
	{
    SetPlayerInterior(id,3);
    new rnd;
    rnd = random(sizeof (ArrestedSpawn));
    SetPlayerPos(id, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, ArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,id,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);
    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
    SendClientMessage(id,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have arrested %s(%d) - you receive a $2500 bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,2500);
	Jailed[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =200;
	JailTimeServed[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
   	}
	else if(GetPlayerWantedLevel(id) >=10 && GetPlayerWantedLevel(id) <=14)
	{
   	SetPlayerInterior(id,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);

    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3000 bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,3000);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =280;
	JailTimeServed[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
	}
	else if(GetPlayerWantedLevel(id) >=15 && GetPlayerWantedLevel(id) <=24)
	{
  	SetPlayerInterior(id,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);

    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3500 bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,3500);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =320;
	JailTimeServed[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +1);
   	}
	else if(GetPlayerWantedLevel(id) >=25)
	{
    SetPlayerInterior(id,10);
    new rnd;
    rnd = random(sizeof (AlcatrazArrestedSpawn));
    SetPlayerPos(id, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
    SetPlayerFacingAngle(id, AlcatrazArrestedSpawn[rnd][3]);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    SendClientMessageToAll(0x00C7FFAA, string);

    SendClientMessage(id, 0xA9A9A9AA, "|_You Have Been Arrested_|");
    format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
    SendClientMessage(id,0x00C7FFAA, string);
    SendClientMessage(id,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
    SendClientMessage(id,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
    format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $4000 bonus",pname,id);
    SendClientMessage(playerid,0x00C7FFAA, string);
    GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
    format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,id,oname,playerid);
    printf("%s", string);
    SendClientMessage(id,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
    GivePlayerMoney(playerid,4000);
	Jailed[id] =1;
	InAlcatraz[id] =1;
	triedtoescaperecent[id] =1;
	ResetPlayerWeapons(id);
	JailTime[id] =420;
	JailTimeServed[id] =0;
	SetPlayerWantedLevel(id,0);
	oscore = GetPlayerScore(playerid);
   	SetPlayerScore(playerid, oscore +2);
	}
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000FF, "Only COPS/ARMY/FBI/BOUNTLY");
	}
	return true;
}
Reply
#2

Any help? Pllssss
Reply
#3

bump!
Reply
#4

pawn Код:
CMD:arr(playerid,params[],help)
Why are you using the third parameter here 'help'? You are not using it anywhere in the command (I think we can't use it, for parameters we use sscanf) Try, removing 'help'.

pawn Код:
CMD:arr(playerid, params[])
Reply
#5

Same problem... doesn't work..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)