23.05.2012, 12:15
pawn Код:
CMD:robbank(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2308.7346, -11.0134, 26.7422))
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You aren't at bank!");
return 1;
}
if(PlayerInfo[playerid][pFreezeBank] == 1) return SendClientMessageEx(playerid, COLOR_GREY, "Your bank is currently frozen");
new family = PlayerInfo[playerid][pFMember];
new rank = PlayerInfo[playerid][pRank];
new giveplayerid;
if(rank < 5) {
SendClientMessageEx(playerid, COLOR_GRAD2, "You have to be at least Rank 5 to rob a bank");
WantedPoints[giveplayerid] += 5;
return 1;
}
if(family == 255) {
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not in a family/gang, you can not rob banks");
return 1;
}
new string[500];
CreateProgressBar(258.00, 137.00, 131.50, 3.19, COLOR_GREEN, 100.0);
format(string,sizeof(string), " %s is attempting to rob the bank.", GetPlayerNameEx(playerid));
ProxDetector(70.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
SendClientMessageToAllEx(COLOR_LIGHTBLUE, "City alert: Bank is being robbed by someone!!!");
return 1;
}