
Originally Posted by
cooldude159
command :bankrob
EMU: HoloRP Rasta
What does it do: make you Rob the bank But Give out Random amount of coins like i know someone release it but it only set for 200 coins each time i want random amount EVERY time
sorry no one replied.
here's sledmores :bankrob
1. Look for "private Thread workoutDosLooper;" in virtualUsers.cs
2. Under that put "private Thread bankRobLooper;"
3. Look for "private void jailBreak()"
4. Under that put
Code:
private void bankRob()
{
int iCount = 0;
try
{
while (true)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
if (_roomID != BANK VAULT ID HERE || roomUser.Y != BANK VAULT Y CORD HERE || roomUser.X != BANK VAULT X CORD HERE)
{
userManager.sendToCop(1, false, "BK" + "The bank is being robbed get there fast!");
Room.sendSaying(roomUser, "*stops robbing the banks vault*");
jailBreakLooper = null;
jailBreakLooper.Abort();
}
if (iCount == 60)
{
Room.sendSaying(roomUser, "*needs three more minutes to succesfully rob the banks vault*");
}
if (iCount == 120)
{
Room.sendSaying(roomUser, "*needs two more minutes to succesfully rob the banks vault*");
}
if (iCount == 180)
{
Room.sendSaying(roomUser, "*needs one more minute to succesfully rob the banks vault*");
}
iCount++;
if (iCount > 180)
{
Room.sendSaying(roomUser, "*successfully breaks into to the banks vault and claims 200 credits!*");
dbClient.runQuery("UPDATE users SET credits = credits + 200 WHERE id = '" + userID + "' LIMIT 1");
refreshValueables(true, true);
bankRobLooper = null;
bankRobLooper.Abort();
}
Thread.Sleep(1000);
}
}
}
catch
{
Thread.CurrentThread.Abort();
bankRobLooper = null;
}
}
5. Look for ":jailbreak"
6. Under that region put
Code:
#region :bankrob
case "bankrob":
{
if (bankRobLooper == null && _roomID == YOUR BANK VAULT ID HERE && roomUser.Y == THE Y CORD OF THE TILE && roomUser.X == THE X CORD OF THE TILE)
{
userManager.sendToCop(1, false, "BK" + "The bank is being robbed get there fast!");
Room.sendSaying(roomUser, "*Starts to rob the banks vault*");
Room.sendSaying(roomUser, "*needs four more minutes to succesfully rob the banks vault*");
ThreadStart bankRobStarter = new ThreadStart(bankRob);
bankRobLooper = new Thread(bankRobStarter);
bankRobLooper.Priority = ThreadPriority.Lowest;
bankRobLooper.Start();
}
break;
}
#endregion
Don't forget to adjust the cords and room ids.
Credits 100% Sledmore.