Random Score
#1

Hello Guys , I Need help on givng a player Random scores from 25 to 50
Here is my define
PHP Code:
#define CONTEST_SCORE 2 
Can Someone help me ?
Reply
#2

Assign this to your score - random(26)+25
Reply
#3

pawn Code:
stock randomEx(min, max)
    return (random(max - min + 1) + min);
Usage:
pawn Code:
new
    randScore = randomEx(25, 50);
SetPlayerScore(playerid, GetPlayerScore(playerid) + randScore);
Reply
#4

Quote:
Originally Posted by greentarch
View Post
pawn Code:
stock randomEx(min, max)
    return (random(max - min + 1) + min);
Usage:
pawn Code:
new
    randScore = randomEx(25, 50);
SetPlayerScore(playerid, GetPlayerScore(playerid) + randScore);
Where do i have to put all of these , i mean do i have to include
pawn Code:
#define RandomEx
Reply
#5

Quote:
Originally Posted by NewbieTester
View Post
Where do i have to put all of these , i mean do i have to include
pawn Code:
#define RandomEx
pawn Code:
#define rand(%1, %2) random(%2 - %1) + %1
Reply
#6

Quote:
Originally Posted by greentarch
View Post
pawn Code:
stock randomEx(min, max)
    return (random(max - min + 1) + min);
Usage:
pawn Code:
new
    randScore = randomEx(25, 50);
SetPlayerScore(playerid, GetPlayerScore(playerid) + randScore);
Quote:
Originally Posted by iFarbod
View Post
pawn Code:
#define rand(%1, %2) random(%2 - %1) + %1
Then What's Next ? Any Variable connected to the Define ?
Explain pls
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)