Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 9:
- {
- if(playerVariables[playerid][pRob] == 1)
- {
- new randpay = RobPrice[playerid] / 2;
- playerVariables[playerid][pMoney] += randpay;
- format(szMessage, sizeof(szMessage), "Rob succesfuly. You have got a total of $%d.", RobPrice[playerid]);
- SCM(playerid, COLOR_LIGHTGREEN, szMessage);
- playerVariables[playerid][pCheckpoint] = 0;
- DisablePlayerCheckpoint(playerid);
- playerVariables[playerid][pRob] = 0;
- RemovePlayerAttachedObject(playerid, 2);
- }
- else
- {
- DisablePlayerCheckpoint(playerid);
- playerVariables[playerid][pCheckpoint] = 0;
- playerVariables[playerid][pRob] = 0;
- }
- }
- CMD:rob(playerid, params[])
- {
- if(playerVariables[playerid][pWarrants] == 0)
- {
- if(playerVariables[playerid][pDonate] == 0)
- {
- if(playerVariables[playerid][pRobPoints] >= 10)
- {
- if((InBizz[playerid] >= 1) && (GetPlayerVirtualWorld(playerid) - BUSINESS_VIRTUAL_WORLD == InBizz[playerid]))
- {
- if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 1)
- {
- playerVariables[playerid][pRobPoints] -= 10;
- RobTime[playerid] = 11;
- SCM(playerid, COLOR_LIGHTBLUE, "You are now robbing the business, wait 10 seconds to take the money!");
- playerVariables[playerid][pRob] = 1;
- TogglePlayerControllable(playerid, 0);
- playerVariables[playerid][pFreezeTime] = -1;
- playerVariables[playerid][pFreezeType] = 3;
- }
- }
- }
- }
- else if(playerVariables[playerid][pDonate] == 1)
- {
- if(playerVariables[playerid][pRobPoints] >= 8)
- {
- if((InBizz[playerid] >= 1) && (GetPlayerVirtualWorld(playerid) - BUSINESS_VIRTUAL_WORLD == InBizz[playerid]))
- {
- if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 1)
- {
- playerVariables[playerid][pRobPoints] -= 8;
- RobTime[playerid] = 11;
- SCM(playerid, COLOR_LIGHTBLUE, "You are now robbing the business, wait 10 seconds to take the money!");
- playerVariables[playerid][pRob] = 1;
- TogglePlayerControllable(playerid, 0);
- playerVariables[playerid][pFreezeTime] = -1;
- playerVariables[playerid][pFreezeType] = 3;
- }
- }
- }
- }
- else SendClientMessage(playerid, COLOR_GREY, "You don't have enough rob points.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "You can't rob the bank because you are a wanted player.");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement