Code: Show/Hide int a = 0; for(int a = 0; a < 10; a++) { if(player == pname) { ///////////////////////// if(prize == "SNE" || prize == "sne" || prize == "Sne") { sendPrivate(p, int (a) + " 500 bounty + 2prox "); } if(prize == "EVENT" || prize == "event" || prize == "Event") { sendPrivate(p, int (a) + " 250 bounty + prox"); } } } |
Code: Show/Hide BDwinsAlt> !listprize BDTEST1> 250 bounty + prox BDTEST1> 250 bounty + prox BDTEST1> 50 bounty + prox BDTEST1> 0 bounty + prox BDTEST1> bounty + prox BDTEST1> bounty + prox BDTEST1> ounty + prox BDTEST1> unty + prox BDTEST1> nty + prox BDTEST1> ty + prox BDTEST1> 500 bounty + 2prox BDTEST1> 500 bounty + 2prox BDTEST1> 00 bounty + 2prox BDTEST1> 0 bounty + 2prox BDTEST1> bounty + 2prox BDTEST1> bounty + 2prox BDTEST1> ounty + 2prox BDTEST1> unty + 2prox BDTEST1> nty + 2prox BDTEST1> ty + 2prox |
Code: Show/Hide sprintf(buf, "%d. 500 bounty + 2prox", a);
//where buf is the char* it will be located |
BDwinsAlt wrote: |
Hmm I seem to still be having some trouble. Can you give me a basic example please? I'm usually writing in Java so this is a turn around for me. |
Code: Show/Hide char * buffer; if(player == pname) { ///////////////////////// int a = 1; if(prize == "SNE" || prize == "sne" || prize == "Sne") { sprintf(buffer, "%d. 500 bounty + 2prox", a); a=a+1; sendPrivate(p, buffer); } if(prize == "EVENT" || prize == "event" || prize == "Event") { sprintf(buffer, "%d. 500 bounty + 2prox", a); a=a+1; sendPrivate(p, buffer); } } |
Code: Show/Hide Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox Catid.Bot> 1. 500 bounty + 2prox |