14.08.2012, 18:47
Quote:
Код:
new timesrobbed[MAX_PLAYERS]; Код:
timesrobbed[playerid] = 0; Код:
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 '*' |