/robbank ?
#1

I want to add a /robbank system in my gamemode, but one with:


The Los Santos is being robbed!

But how do I add it? And if someone got it want to share it with me? PM ME.
Reply
#2

Just create a command where if they are in range of a certain point inside the bank:
pawn Код:
IsPlayerInRangeOfPoint(Float: range, Float: x, Float: y, Float: z);
Then if they are, they can use /robbank. Then you should make a timer
pawn Код:
SetTimerEx("name", interval, repeating, format, float);

forward name();
public name();
So that when the timer hits zero, and they haven't been killed, they get the cash. And if you want, you can set a player checkpoint making them have to go to a drop off location to drop the cash off before actually receiving it.

Hope this help a little bit.

It's easy to do for me, but if this is confusing, just shoot me a PM, and I will script it for you in your script over teamviewer.
Reply
#3

pawn Код:
new RCash[1] =
{
    {1000000},
    {100000},
    {149401},
    {197048},
    {120938},
    {9487401},
    {129308213}
};

CMD:robbank(playerid, params[])
{
SetTimer"BankRobbed", 1000,false);
SendClientMessageToAll(-1,"Los Santos is being robbed");
return 1;
}

forward BankRobbed(playerid);

public BankRobbed(playerid)
{
new rand = random(sizeof(RCash));
GivePlayerMoney(playerid, rand);
return 1;
}
i tried something hope it worked
Reply
#4

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
pawn Код:
new RCash[1] =
{
    {1000000},
    {100000},
    {149401},
    {197048},
    {120938},
    {9487401},
    {129308213}
};

CMD:robbank(playerid, params[])
{
SetTimer"BankRobbed", 1000,false);
SendClientMessageToAll(-1,"Los Santos is being robbed");
return 1;
}

forward BankRobbed(playerid);

public BankRobbed(playerid)
{
new rand = random(sizeof(RCash));
GivePlayerMoney(playerid, rand);
return 1;
}
i tried something hope it worked
Lol. First, you made a mistake here -->
pawn Код:
SetTimer"BankRobbed", 1000,false);
Second, he only has to rob for one second? Lol.

Third, you could have just done:
pawn Код:
new rand = random(999999999);
GivePlayerMoney(playerid, rand);
return 1;
Reply
#5

i done have to use Settimerex like what u want. n kiddo cant he adjust his own timer? come on make some sense out of ur non sense
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)