#1

I'm using Ryder's race sys.


The problem is with the timer, It won't run a random race. Nothing happen. What i am doing wrong ?

OnFilterScriptInit

Код:
SetTimer("Start_autorace", 60000, true);
Код:
function Start_autorace( )
{
	LoadRaceNames( ), LoadAutoRace( RaceNames[ random( TotalRaces ) ] );
	return 1;
}
Reply
#2

Код:
function Start_autorace( )
{
        print("Function Start_autorace invoked");
	LoadRaceNames( ), LoadAutoRace( RaceNames[ random( TotalRaces ) ] );
	return 1;
}
Check it is indeed starting the function, if that works, then check the random that it's obtaining and print that out using printf.
Reply
#3

function Start_autorace( )

needs to be:

Код:
forward Start_autorace( );
public Start_autorace( )
Reply
#4

Quote:
Originally Posted by TakeiT
Посмотреть сообщение
function Start_autorace( )

needs to be:

Код:
forward Start_autorace( );
public Start_autorace( )
There maybe a macro defined for forward and public, thats not the error.
Reply
#5

It doesen't work and printf sending "Function Start_autorace invoked" .
Reply
#6

BUMP!

+REP if helped.
Reply
#7

pawn Код:
SetTimer("Start_autorace", 60000, true);

forward Start_autorace();
public Start_autorace()
{
//code here
}
Reply
#8

Quote:
Originally Posted by rfr
Посмотреть сообщение
pawn Код:
SetTimer("Start_autorace", 60000, true);

forward Start_autorace();
public Start_autorace()
{
//code here
}
Don't you see there is already functions

LoadRaceNames( ), LoadAutoRace( RaceNames[ random( TotalRaces ) ] );
Reply
#9

Quote:
Originally Posted by Hunud
Посмотреть сообщение
It doesen't work and printf sending "Function Start_autorace invoked" .
Meaning that your function is getting called, but races aren't loading. Check Sew's reply again. He covered it all what you needed.

Also wtf is -

"BUMP"

"+REP if I helped"?
Reply
#10

I did what he said, stil it doesen't work as expected.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)