Command Request
#10

Quote:
Originally Posted by BigBaws
Посмотреть сообщение
Код:
new timesrobbed[MAX_PLAYERS];
Public OnplayerConnect

Код:
timesrobbed[playerid] = 0;
public OnPlayerCommandText

Код:
if(strcmp(cmd, "/rob", true) == 0)
	{
        if(PlayerToPoint(3, playerid,// add Coordes here where players can rob this place))
		{
			if(timesrobbed[playerid] == 1)
			{
			    SendClientMessage(playerid, COLOR_YELLOW, "You cannot rob the Bank more then once per day!");
			}
			if(timesrobbed[playerid] == 0)
		    {
				GetPlayerName(playerid, sendername, sizeof(sendername));
				new robmoney = random(4000);
          		        ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 0, 0); // Rob
          		        SendClientMessage(playerid, 0xFF0000FF, " ");
		                timesrobbed[playerid]+=1;
				format(string, sizeof(string), "** HQ: The 24/7 in Los Santos has been robbed!. **", sendername);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string);
				WantedPoints[playerid]+=3; SetPlayerCriminal(playerid,255, "Robbing the 24/7!");
				SendClientMessage(playerid, COLOR_YELLOW, "You have been seen on the security cameras! Run away!");
				format(string,sizeof(string), "* %s points his gun at the clerk and attempts to rob the 24/7.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  				format(string, sizeof(string), "** You have successfully stolen $%d!",500);
   				SendClientMessage(playerid,COLOR_YELLOW,string);
				SafeGivePlayerMoney(playerid, 500);
 			}
		}
		return 1;
	}



REP+ If i helps you '*'
Don't working too many errors , i need all definitions !
Reply


Messages In This Thread
Command Request - by Sp3cter - 13.08.2012, 14:25
Re : Command Request - by mazz57 - 13.08.2012, 14:28
Re: Re : Command Request - by Snipa - 13.08.2012, 14:30
Re: Re : Command Request - by Sp3cter - 13.08.2012, 14:35
Re: Re : Command Request - by CROSS_Hunter - 13.08.2012, 14:37
Re: Re : Command Request - by Sp3cter - 13.08.2012, 15:01
Re: Command Request - by Sp3cter - 13.08.2012, 16:04
Re: Command Request - by Sp3cter - 14.08.2012, 15:46
Re : Command Request - by BigBaws - 14.08.2012, 15:55
Re : Command Request - by Sp3cter - 14.08.2012, 18:47

Forum Jump:


Users browsing this thread: 5 Guest(s)