[Help]Simple question.
#1

Hey there,

I was wondering how can I do something such as, when a player uses a CMD he gets a random number from 1-10000 or something and the numbers mustn't be for a player same as other.

Thanks...
Reply
#2

pawn Код:
stock randomEx(min, max)
{    
    //Credits to ******    
    new rand = random(max-min)+min;    
    return rand;
}
Reply
#3

Quote:
Originally Posted by |_ⒾⓇⓄN_ⒹⓄG_|
Посмотреть сообщение
pawn Код:
stock randomEx(min, max)
{    
    //Credits to ******    
    new rand = random(max-min)+min;    
    return rand;
}
Mind explaining how does it work and how may I use it? thank you.
Reply
#4

Read wiki for basics on scripting. I don't think anyone will going to explain how Pawno works in details here.
wiki.sa-mp.com
Reply
#5

put it inside a command idk and get a number between the 2 values u said...
eg:
pawn Код:
cmd:hello(playerid,params[])
{
new string[60], randomnumber;
randomnumber = randomEx(1,10000);
format(string, sizeof(string), "the number is %d", randomnumber );
not tested, i dunno if it works lol
im noob too
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)