Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ssuitChatCommand : public ChatCommandClass {
- void Triggered(int ID,const TokenClass &Text,int ChatType) {
- GameObject *obj = Get_GameObj(ID);
- GameObject *veh = Get_Vehicle(obj);
- int cost = 900;
- int curMoney = Commands->Get_Money(obj);
- if(curMoney >= cost)
- {
- Commands->Give_Money(obj, -cost, 0);
- Commands->Enable_Stealth(veh,0);
- Console_Input(StrFormat("ppage %d You have purchased a stealth suit for your vehicle (costs 900)", Get_Player_ID(obj)).c_str());
- }
- else {
- Console_Input(StrFormat("ppage %d You done have enough money for this purchase.(costs 900)", Get_Player_ID(obj)).c_str()); }
- }
- };
- ChatCommandRegistrant<ssuitChatCommand> ssuitChatCommandReg("!stealthsuit",CHATTYPE_ALL,0,GAMEMODE_AOW);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement