I have a Question
#1

Hello there friends.
I have a simple questions for those who knows about what i'm talking.
Why if i use "TogglePlayerSpectating( playerid, true )" at public "OnPlayerConnect( playerid )", my map that must
to appear at public "OnPlayerRequestClass( playerid, classid )" don't appear ? I disable the spectate when a player "Login/Register" because i want to use "Spectate Mode" just when a player "Login/Register".

* If i use "TogglePlayerSpectate" even if it is disabled when the public "OnPlayerRequest" comes, appears to me
when i press "<< >> or SPAWN" just parts from map and then dissapear immediate. Does anyone have any idea?
Reply
#2

You mean your objects not appearing when you TogglePlayerSpectate?

well if yes then you have to use Streamer Update.
you can use this after setting player pos
PHP код:
Streamer_Update(playerid); 
or also you can use this which is more accurate.
PHP код:
 Streamer_UpdateEx(playeridFloat:xFloat:yFloat:z); 
Reply
#3

Quote:
Originally Posted by jlalt
Посмотреть сообщение
You mean your objects not appearing when you TogglePlayerSpectate?

well if yes then you have to use Streamer Update.
you can use this after setting player pos
PHP код:
Streamer_Update(playerid); 
or also you can use this which is more accurate.
PHP код:
 Streamer_UpdateEx(playeridFloat:xFloat:yFloat:z); 
Hello there @jlalt

Код:
switch( classid )
	{
		case 0..55:
		{
		    SetPlayerTime( playerid, 0, 0 );
			SetPlayerInterior( playerid, 0 );

			if( GetPlayerVirtualWorld( playerid ) != 11 )
				SetPlayerVirtualWorld( playerid, 11 );

			SetPlayerPos( playerid, 1929.6469,-2818.9055,5.7799 );
			SetPlayerFacingAngle( playerid, 178.9658 );
			ApplyAnimation( playerid, "DANCING", "DAN_Loop_A", 4.0, 1, 0, 0, 0, 0 );
		 	ApplyAnimation( playerid, "DANCING", "DAN_Loop_A", 4.0, 1, 0, 0, 0, 0 );
			SetPlayerAttachedObject( playerid, 0, 19079, 1, 0.330000, -0.079999, 0.150000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
			SetPlayerAttachedObject( playerid, 1, 18693, 5, -0.100000, 0.000000, -1.750000, 0.000000, 0.000000, 0.000000, 100.000000, 1.000000, 1.000000 );
			SetPlayerAttachedObject( playerid, 2, 18693, 6, 0.000000, 0.000000, 1.750000, 180.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
			SetPlayerCameraPos( playerid, 1928.8866, -2825.4265, 6.5730 );
			SetPlayerCameraLookAt( playerid, 1929.1681, -2824.4680, 6.5030 );
			Streamer_UpdateEx( playerid, 1931.51624, -2832.97754, 5.74180, 11 );
		}
	}
- I use this already.. or it is something wrong with it ?
Reply
#4

Show the code of request class, I wanna clear out my doubt
Reply
#5

Код:
forward OnPlayerRequestClass( playerid, classid );
public OnPlayerRequestClass( playerid, classid )
{
    HideIntroTextdraws( playerid );
	HideSpawnTextdraws( playerid );

	gPlayerSpawned[ playerid ] = false;
    gTeamSelection[ playerid ] = true;
    
	TextDrawHideForPlayer( playerid, TextAfk1 );
	TextDrawHideForPlayer( playerid, TextAfk2 );
	TextDrawHideForPlayer( playerid, Name_Intro );
	TextDrawHideForPlayer( playerid, Reaction_TD );
	
	PlayerTextDrawHide( playerid, gTerswarTD[ playerid ] );
	PlayerTextDrawHide( playerid, gTerswarBarTD[ playerid ] );
	HidePlayerProgressBar( playerid, gTerswarBar[ playerid ] );

    switch( classid )
	{
		case 0..55:
		{
		    SetPlayerTime( playerid, 0, 0 );
			SetPlayerInterior( playerid, 0 );

			if( GetPlayerVirtualWorld( playerid ) != 11 )
				SetPlayerVirtualWorld( playerid, 11 );

			SetPlayerPos( playerid, 1929.6469,-2818.9055,5.7799 );
			SetPlayerFacingAngle( playerid, 178.9658 );
			ApplyAnimation( playerid, "DANCING", "DAN_Loop_A", 4.0, 1, 0, 0, 0, 0 );
		 	ApplyAnimation( playerid, "DANCING", "DAN_Loop_A", 4.0, 1, 0, 0, 0, 0 );
			SetPlayerAttachedObject( playerid, 0, 19079, 1, 0.330000, -0.079999, 0.150000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
			SetPlayerAttachedObject( playerid, 1, 18693, 5, -0.100000, 0.000000, -1.750000, 0.000000, 0.000000, 0.000000, 100.000000, 1.000000, 1.000000 );
			SetPlayerAttachedObject( playerid, 2, 18693, 6, 0.000000, 0.000000, 1.750000, 180.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
			SetPlayerCameraPos( playerid, 1928.8866, -2825.4265, 6.5730 );
			SetPlayerCameraLookAt( playerid, 1929.1681, -2824.4680, 6.5030 );
			Streamer_UpdateEx( playerid, 1931.51624, -2832.97754, 5.74180, 11 );
		}
	}
	return 1;
}
That's it.
Also i saw that, one of the objects it is not dynamic and appear, can be this the problem ? Maybe i must make the objects from request not dynamic ?
Reply
#6

NVM...
Reply
#7

if( GetPlayerVirtualWorld( playerid ) != 11 ) SetPlayerVirtualWorld( playerid, 11 );
That "11" it is for World if u look closer. The Interior is 0.
Reply
#8

Show any 1 line of your map code
Reply
#9

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
Show any 1 line of your map code
Thank you very much to all, the problem was that the objects were dynamic. Solved. Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)