random xp
#1

Hi... i have an xp system, but i dont know how to make that to player it will be given random? can someone help me?

pawn Код:
pInfo[killerid][xp]+=20;
Reply
#2

pawn Код:
new xprandom;
pInfo[killerid][Patirtis]+= xprandom = random(50);
i think that way dunt know.
Reply
#3

i think this can help you
Reply
#4

pawn Код:
warning: symbol is assigned a value that is never used: "xprandom"
Reply
#5

pawn Код:
pInfo[killerid][Patirtis]+= xprandom == random(50);
Reply
#6

pawn Код:
pInfo[killerid][xp] += random(20) + 1;
random(20) means that it'll select a number between 0 and 19, NOT between 1 and 20. Hence why the '+1'.
Reply
#7

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
pawn Код:
pInfo[killerid][xp] += random(20) + 1;
random(20) means that it'll select a number between 0 and 19, NOT between 1 and 20. Hence why the '+1'.
pawn Код:
[warning 213: tag mismatch
Reply
#8

can someone help??
Reply
#9

pInfo[killerid][Patirtis]+= random(500); // switch the random ammount
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)