#1

Can you guys help me, please? I know, it's a stupid error... But I don't know how to fix it

Код:
public OnGameModeInit(playerid)
{
	PlayerPlaySound(playerid,1063,0.0,0.0,0.0);
And I have got an error "error 025: function heading differs from prototype"

Can somebody help me?
Reply
#2

You can't make up your own parameters on callbacks. Removed the playerid from OnGameModeInit, and add the PlayerPlaySound someone else where there's a playerid parameter.

Reply
#3

Put it under OnPlayerConnect. That way, it will play the sound when a new player connects for him.
Reply
#4

Quote:
Originally Posted by DJDhan
Put it under OnPlayerConnect. That way, it will play the sound when a new player connects for him.
No, no! I have this:

Код:
PlayerPlaySound(playerid,1062,-3359.1,3008.2,1.7);
On "public SetupPlayerForClassSelection(playerid)"...

I want stop this music by using (on spawn):

Код:
PlayerPlaySound(playerid,1063,-3359.1,3008.2,1.7);
Reply
#5

There is no function to stop a sound played by PlayerPlayerSound. It will get over once it's over. I suggest you use a shorter sound.
Reply
#6

Quote:
Originally Posted by DJDhan
There is no function to stop a sound played by PlayerPlayerSound. It will get over once it's over. I suggest you use a shorter sound.
There is. Else San Andreas couldn't stopped some sounds either.

As on-topic:

There isn't a playerid variable for OnGameModeInit. OnGameModeInit simply loads and creates all the stuff you'd need later.
Reply
#7

use 1184 to turn the sound off
Reply
#8

You need to use a loop and do it under OnGameModeExit because OnGameModeInit there are no players connected.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)