15.05.2013, 08:10
pawn Код:
if(strcmp(cmd, "/robbank", true) == 0)
{
new Amount[200];
new loot = random(300000);
if(IsPlayerInRangeOfPoint(playerid, 10.0, 2240.57,2303.70,2.41) || IsPlayerInRangeOfPoint(playerid, 10.0, -1609.12,89.46,-0.59) || IsPlayerInRangeOfPoint(playerid, 10.0, -831.60,1514.38,12.21) || IsPlayerInRangeOfPoint(playerid, 10, -169.18,1183.21,12.21) || IsPlayerInRangeOfPoint(playerid, 10, 1482.51,-1791.82,9.1))//LS
{
if(HasRobbed[playerid] == 0)
{
if(GetPlayerWantedLevel(playerid) < 3)
{
format(Amount,sizeof(Amount), "You have robbed the bank and receive $%d", loot);
SendClientMessage(playerid, 0x00FF00FF, Amount);
GivePlayerMoney(playerid,loot);
SetPlayerScore(playerid,GetPlayerScore(playerid) + 3);
HasRobbed[playerid] = 1;
SetPlayerWantedLevel(playerid,6);
SetTimer("RobTimer", 15000,0);
qween = playerid;
}
else
SendClientMessage(playerid,0xFF0000FF, "You must be in a bank to use this conmmnand.");
}
else
SendClientMessage(playerid,0xFF0000FF, "Your wanted level is currently too high.");
}
else
SendClientMessage(playerid,0xFF0000FF, "This Bank Has Already Been Robbed, Come Back Later.");
return 1;
}