31.05.2010, 00:53
I need help : i got this script:
public RobBank(playerid)
{
new string[128];
if(IsPlayerInRangeOfPoint(playerid, 2, 2309.6060,-4.0211,26.7422))
{
if(RobbingTime[playerid] > 0)
{
RobbingTime[playerid] --;
GameTextForPlayer(playerid, "~w~Remain in the ~r~Pickup ~w~until the time ends!", 1000,4);
}
else
{
RobbingTime[playerid] = 0;
KillTimer(RobBankTimer);
SetPlayerCheckpoint(playerid, 43,1544.3834,17.3083,24.1406);
new money = random(34555);
SafeGivePlayerMoney(playerid, money);
format(string, sizeof(string),"~w~You Robbed ~g~$%d ~w~From the ~y~Bank!", money);
GameTextForPlayer(playerid, string, 6000, 4);
format(string, sizeof(string),"* Congraz You robbed $%d From the Bank!",money);
SendClientMessage(playerid, COLOR_GREY, string);
WantedPoints[playerid] = 2;
SetPlayerCriminal(playerid,255, "Robbing the Bank");
}
Why didn't i put in quote yet??
Check the red line the checkpoint thing...
I have tryed for about an hour to do this: i want that when you type /robbank you wait for 95 seconds after the 95 seconds some one tells you go to the checkpoint to get your money.
The problem is that : when you do /robbank you wait 95 seconds you get your money and then the checkpoint comes.. so i want to change it : /robbank // wait 95 seconds // go to check point // get an ammount of money max: 34555$
public RobBank(playerid)
{
new string[128];
if(IsPlayerInRangeOfPoint(playerid, 2, 2309.6060,-4.0211,26.7422))
{
if(RobbingTime[playerid] > 0)
{
RobbingTime[playerid] --;
GameTextForPlayer(playerid, "~w~Remain in the ~r~Pickup ~w~until the time ends!", 1000,4);
}
else
{
RobbingTime[playerid] = 0;
KillTimer(RobBankTimer);
SetPlayerCheckpoint(playerid, 43,1544.3834,17.3083,24.1406);
new money = random(34555);
SafeGivePlayerMoney(playerid, money);
format(string, sizeof(string),"~w~You Robbed ~g~$%d ~w~From the ~y~Bank!", money);
GameTextForPlayer(playerid, string, 6000, 4);
format(string, sizeof(string),"* Congraz You robbed $%d From the Bank!",money);
SendClientMessage(playerid, COLOR_GREY, string);
WantedPoints[playerid] = 2;
SetPlayerCriminal(playerid,255, "Robbing the Bank");
}
Why didn't i put in quote yet??
Check the red line the checkpoint thing...
Код:
public RobBank(playerid) { new string[128]; if(IsPlayerInRangeOfPoint(playerid, 2, 2309.6060,-4.0211,26.7422)) { if(RobbingTime[playerid] > 0) { RobbingTime[playerid] --; GameTextForPlayer(playerid, "~w~Remain in the ~r~Pickup ~w~until the time ends!", 1000,4); } else { RobbingTime[playerid] = 0; KillTimer(RobBankTimer); SetPlayerCheckpoint(playerid, 43,1544.3834,17.3083,24.1406); new money = random(34555); SafeGivePlayerMoney(playerid, money); format(string, sizeof(string),"~w~You Robbed ~g~$%d ~w~From the ~y~Bank!", money); GameTextForPlayer(playerid, string, 6000, 4); format(string, sizeof(string),"* Congraz You robbed $%d From the Bank!",money); SendClientMessage(playerid, COLOR_GREY, string); WantedPoints[playerid] = 2; SetPlayerCriminal(playerid,255, "Robbing the Bank"); }
The problem is that : when you do /robbank you wait 95 seconds you get your money and then the checkpoint comes.. so i want to change it : /robbank // wait 95 seconds // go to check point // get an ammount of money max: 34555$