Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. class ssuitChatCommand : public ChatCommandClass {
  2.     void Triggered(int ID,const TokenClass &Text,int ChatType) {
  3. GameObject *obj = Get_GameObj(ID);
  4. GameObject *veh = Get_Vehicle(obj);
  5. int cost = 900;
  6. int curMoney = Commands->Get_Money(obj);
  7. if(curMoney >= cost)
  8. {
  9.     Commands->Give_Money(obj, -cost, 0);
  10.     Commands->Enable_Stealth(veh,0);
  11.     Console_Input(StrFormat("ppage %d You have purchased a stealth suit for your vehicle (costs 900)", Get_Player_ID(obj)).c_str());
  12. }
  13. else {
  14.     Console_Input(StrFormat("ppage %d You done have enough money for this purchase.(costs 900)", Get_Player_ID(obj)).c_str()); }
  15.     }
  16. };
  17. ChatCommandRegistrant<ssuitChatCommand> ssuitChatCommandReg("!stealthsuit",CHATTYPE_ALL,0,GAMEMODE_AOW);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement