asking about crazybob's CnR
#10

this is my test /ar command i will better it later but you can figure out

Код:
if ((strcmp("/ar", cmd, true) == 0) || (strcmp(cmd, "/arrest", true) == 0))
	{
	new tmp[256];
	tmp = strtok(cmdtext, idx);
	
	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
	
	giveplayerid = strval(tmp);

	if(!strlen(tmp)) {
	SendClientMessage(playerid,0xFF0000AA, "USAGE: /Ar [Playerid] / [Player Name]");
	return 1;
	}
	if(!IsPlayerConnected(giveplayerid))
	{
	SendClientMessage(playerid,0xFF0000AA,"ERROR: Invaild ID!");
	return 1;
	}
	if(GetPlayerWantedLevel(playerid) >= 4)
	{
	format(string, sizeof(string), "You Have Been Arrested by Officer %s[%d]!",playername,playerid);
	SendClientMessage(giveplayerid,0x33CCFFAA,string);
	
	format(string, sizeof(string), "~r~BUSTED!");
	GameTextForPlayer(giveplayerid,string,3000,5);
	
	format(string, sizeof(string), "You Arrested %s[%d], You Get $2500!",playername,giveplayerid);
	SendClientMessage(playerid,0x33CCFFAA,string);
	
	format(string, sizeof(string), "Suspect %s[%d] Has Been Arrested By Officer %s[%d].",playername,giveplayerid,playername,playerid);
	SendClientMessageToAll(0x33CCFFAA,string);
	
	format(string, sizeof(string), "~b~WELL DONE!");
	GameTextForPlayer(playerid,string,3000,5);
	
	GivePlayerMoney(playerid,2500);
	SetPlayerScore(playerid,1);
	
	SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP);
	ResetPlayerWeapons(giveplayerid);
	}
	return 1;
	}
	return 0;
}
it wors GREAT but i need to fic to give player socre and some other things
Reply


Messages In This Thread
asking about crazybob's CnR - by speed337 - 09.08.2009, 05:02
Re: asking about crazybob's CnR - by Zeromanster - 09.08.2009, 05:07
Re: asking about crazybob's CnR - by Joe Staff - 09.08.2009, 06:13
Re: asking about crazybob's CnR - by speed337 - 09.08.2009, 08:52
Re: asking about crazybob's CnR - by speed337 - 09.08.2009, 13:42
Re: asking about crazybob's CnR - by Geekzor - 10.08.2009, 20:08
Re: asking about crazybob's CnR - by speed337 - 11.08.2009, 05:57
Re: asking about crazybob's CnR - by speed337 - 12.08.2009, 12:43
Re: asking about crazybob's CnR - by Dominicz - 05.11.2009, 13:37
Re: asking about crazybob's CnR - by Lajko1 - 05.11.2009, 15:28

Forum Jump:


Users browsing this thread: 3 Guest(s)