How to make this kind of function?
#5

Quote:
Originally Posted by 0ne
Umh ok, look right now i got a function like this:
Код:
new random_points[][3] = {
	{5,13,30}
and i want a function like :

Код:
new rand_proc = {
	{random(4)+30},
the point of this is that the random_points gives only 5,13,30 points and i want to make that it would give 4,5,6,7,8,9,10,11... and so on to 30, understand?
pawn Код:
stock GiveRandomPoints( playerid, maxpoints )
{
    return SetPlayerScore( playerid, GetPlayerScore( playerid )+random( maxpoints ) );
}
You might use a variable to hold the points/score, but I've simplified it for you. There's no need whatsoever for an enum. This could will work.
Reply


Messages In This Thread
How to make this kind of function? - by 0ne - 20.04.2010, 16:12
Re: How to make this kind of function? - by 0ne - 21.04.2010, 10:48
Re: How to make this kind of function? - by boelie - 21.04.2010, 10:56
Re: How to make this kind of function? - by 0ne - 21.04.2010, 10:59
Re: How to make this kind of function? - by Calgon - 21.04.2010, 11:02
Re: How to make this kind of function? - by 0ne - 21.04.2010, 11:05
Re: How to make this kind of function? - by 0ne - 21.04.2010, 17:11
Re: How to make this kind of function? - by FUNExtreme - 21.04.2010, 17:30
Re: How to make this kind of function? - by 0ne - 21.04.2010, 17:55
Re: How to make this kind of function? - by ¤Adas¤ - 21.04.2010, 17:56

Forum Jump:


Users browsing this thread: 1 Guest(s)