Guest User

Untitled

a guest
May 7th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. void DoNoUpgradeSwitch(int ClientID, CGameContext* pGameServer, char* aUpgrade)
  2. {
  3.     if(!pGameServer->m_apPlayers[ClientID]->AccountData.m_LoggedIn)
  4.     {
  5.         pGameServer->SendChatTarget(ClientID, "You are not logged in!");
  6.         return;
  7.     }
  8.  
  9.     char aBuf[512];
  10.     if(!*pSwitcher)
  11.     {
  12.         *pSwitcher = true;
  13.         str_format(aBuf, sizeof(aBuf), "%s activated!", aUpgrade);
  14.         pGameServer->SendChatTarget(ClientID, aBuf);
  15.     }
  16.     else if(*pSwitcher)
  17.     {
  18.         *pSwitcher = false;
  19.         str_format(aBuf, sizeof(aBuf), "%s deactivated!", aUpgrade);
  20.         pGameServer->SendChatTarget(ClientID, aBuf);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment