02.04.2012, 11:22
i don't want to create another thread so i post here.
why when i rob the LS Bank Central i get this message "$0" instead of the amount of money has been rob
why when i rob the LS Bank Central i get this message "$0" instead of the amount of money has been rob
pawn Код:
CMD:robbank(playerid, params[])
{
new string[128];
if(IsPlayerInRangeOfPoint(playerid, 1.0, 358.7953,184.0279,1008.3828))
{
if(pInfo[playerid][SkillLevel] > 3)
{
if(pInfo[playerid][Rob] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can rob this bank again after 5 minutes!");
new rMoney = random(5);
switch(rMoney)
{
case 0: GivePlayerMoney(playerid, 500000);
case 1: GivePlayerMoney(playerid, 5000000);
case 2: GivePlayerMoney(playerid, 1000000);
case 3: GivePlayerMoney(playerid, 100000);
case 4: GivePlayerMoney(playerid, 90000);
}
pInfo[playerid][Rob] = 1;
pInfo[playerid][SkillLevel]++;
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 2);
format(string, sizeof(string), "NEWS REPORT: "red"LS Bank Central "white"has been rob by "red"%s", GetName(playerid));
SendClientMessageToAll(COLOR_WHITE, string);
format(string, sizeof(string), "You rob the Los Santos Bank Central, you got $%i, now run before cop caught you!", rMoney);
SendClientMessage(playerid, COLOR_RED, string);
SendClientMessage(playerid, COLOR_GREY, "You can rob this bank after 5 minutes!");
SetTimer("RobEvaded", 300000, false);
}
else return SendClientMessage(playerid, COLOR_GREY, " You are not at Skill Level 3, so you cannot rob this bank! ");
} else {
SendClientMessage(playerid, COLOR_GREY, " You are not at LS Bank Central Money Account Service Area! ");
}
return 1;
}