Simple command I think all coders can create.
say you and a buddy are hunting wws, you get a good drop.
in wow you get a /roll command which chooses a number at random, usually the highest number wins.
how about add a /roll command that will randomly roll numbers 1-100.
can someone do this please?
[REQ] /roll command
Probably one of the easiest things I've seen requested xDKardon wrote: Simple command I think all coders can create.
say you and a buddy are hunting wws, you get a good drop.
in wow you get a /roll command which chooses a number at random, usually the highest number wins.
how about add a /roll command that will randomly roll numbers 1-100.
can someone do this please?
Code: Select all
if (memcmp(cp, "/roll", 5) == 0) {
wsprintf(G_cTxt, "Random dice roll: %d", iDice(1,100));
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, G_cTxt);
return;
}
Code: Select all
if (memcmp(cp, "/roll", 5) == 0) {
CStrTok * pStrTok = new class CStrTok(cp, " ");
char * token;
token = pStrTok->pGet();
token = pStrTok->pGet();
if (token == NULL) {
delete pStrTok;
return;
}
for (int x = 0; x < DEF_MAXCLIENTS; x++)
if ((m_pClientList[x] != NULL) && (memcmp(m_pClientList[x]->m_cCharName, token, 10) == 0)) {
int iRoll = iDice(1,100);
wsprintf(G_cTxt, "Random dice roll: %d", iRoll);
SendNotifyMsg(NULL, x, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, G_cTxt);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOTICEMSG, NULL, NULL, NULL, G_cTxt);
delete pStrTok;
return;
}
delete pStrTok;
return;
}
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia
</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.

Get the idea of what? He asked for a command to randomly roll a number and return it. That's all it does x.xogeid wrote: u dont get the idea
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia
</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
