SA-MP Forums Archive
random xp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: random xp (/showthread.php?tid=219053)



random xp - jaksimaksi - 31.01.2011

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;



Re: random xp - Kitten - 31.01.2011

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


Re: random xp - Steven Paul - 31.01.2011

i think this can help you


Re: random xp - jaksimaksi - 31.01.2011

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



Re: random xp - Kitten - 31.01.2011

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



Re: random xp - Hiddos - 31.01.2011

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'.


Re: random xp - jaksimaksi - 01.02.2011

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



Re: random xp - jaksimaksi - 01.02.2011

can someone help??


Re: random xp - Marricio - 01.02.2011

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