Nigga
Administrator
Dołączył: 18 Mar 2008
Posty: 43
Przeczytał: 0 tematów
Ostrzeżeń: 0/5
|
Wysłany: Wto 14:20, 18 Mar 2008 Temat postu: [CODE] /contrib |
|
|
HG Server
Game.cpp
Kod: |
/*======ContribScript=====/contrib==By-Acidx==*/
void CGame::Player_OrderContrib(int iClientH)
{/*An Acidx Production - Last Updated Sept.06, 2006 - By Acidx*/
char cMessage[255];
ZeroMemory(cMessage, sizeof(cMessage));
if (iClientH != NULL)
if (m_pClientList[iClientH]->m_iContribution > 100)
{
wsprintf( cMessage ,"Error. You can only use this 1 time");
ShowClientMsg(iClientH, cMessage);
}else
{
wsprintf( cMessage ,"2000 Contrib Has been Added To Your Character");
ShowClientMsg(iClientH, cMessage);
m_pClientList[iClientH]->m_iContribution += 2000;
//Lmao Hack us a notify message to Activly update it in game without needing to logout jaja owned+1 - Acidx
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_QUESTREWARD, 4, 1, m_pClientList[iClientH]->m_iQuestRewardAmount,
"Script By Acidx", m_pClientList[iClientH]->m_iContribution);
}
} |
En el game.cpp, dentro de la funcion "ChatMsgHangler"
Kod: |
if (memcmp(cp, "/contrib", 8) == 0){
Player_OrderContrib(iClientH);
return;
} |
En Game.H, agregar:
Kod: |
void Player_OrderContrib(int iClientH); |
Post został pochwalony 0 razy
|
|