Making a /rights Command for RP
#2

I don't think this is the most efficient way of doing it but it should work I imagine. Try this:

Код:
CMD:rights(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new string[256];
    	if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 ||
			PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 ||  PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 ||
			(PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 ||
			PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
		{
			new pname[20];
			GetPlayerName(playerid,pname,20);
        	format(string, sizeof(string), "%s says: You are under arrest; you have the right to remain silent,",pname);
            ProxDetector(20.0, playerid, string, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        	format(string, sizeof(string), "%s says: anything you say may and will be used against you in a court of law.",pname);
            ProxDetector(20.0, playerid, string, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        	format(string, sizeof(string), "%s says: You have the right to consult an attorney and to have an attorney present during questioning.",pname);
            ProxDetector(20.0, playerid, string, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        	format(string, sizeof(string), "%s says: If you cannot afford an attorney, one will be appointed for you by the court.",pname);
            ProxDetector(20.0, playerid, string, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            format(string, sizeof(string), "%s says: Do you understand each of these rights I have explained to you ?",pname);
            ProxDetector(20.0, playerid, string, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  		}
  		else return SendClientMessage(playerid, COLOR_WHITE, "You cannot use this command.");
   }
   return 1;
}
Reply


Messages In This Thread
Making a /rights Command for RP - by MiiSha - 01.02.2017, 04:13
Re: Making a /rights Command for RP - by Celson - 01.02.2017, 05:36
Re: Making a /rights Command for RP - by MiiSha - 01.02.2017, 06:15
Re: Making a /rights Command for RP - by Celson - 01.02.2017, 06:35
Re: Making a /rights Command for RP - by MiiSha - 01.02.2017, 06:52

Forum Jump:


Users browsing this thread: 2 Guest(s)