Need help with spawn
#1

Hi, I need help with spawn, I don't know what happened and why it is doing that...
When i log in to server (it's not created by me) I just fly to sky in shape of square . maybe you guys know what is it....I got no clue. Thanks for your time.
Here's picture:

http://imgur.com/5KO77Fi

BTW sorry for bad english knowledge...
Reply
#2

Well it can be a mistake on your script,like onplayerspawn or connect.You need to show us your script lines otherwise noone can help with only one pic.
Reply
#3

Can't remember what causes this. Do you have AddPlayerClass lines in your OnGameModeInit callback?
Reply
#4

Try to add this:
PHP код:
TogglePlayerSpectating(playeridfalse); 
on OnPlayerRequestClass.
Reply
#5

This usually happens when player is at spectating mode and the player gets teleported or got their camera resetted / setted by the server, try doing @Dayrion's suggestion.
Reply
#6

Thanks guys, I hope it will help me to fix it.I'll post some pictures of script in no time.
Reply
#7

Hi, I tried to do what you mentioned with spectating and good thing is that it helped me with flying to sky, but
there's now a new problem (Look at attached thumbnails)


and here's the script of spawn:
Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;
    if( !zINFO[ playerid ][ logged ] )
	{
		TogglePlayerSpectating( playerid, false );

		new
		    Query[ 128 ];

		format( Query, 128, "SELECT id FROM `zaidejai` WHERE Name = '%s' LIMIT 1", GET_NAME( playerid ) );
		mysql_query( Query );
		mysql_store_result( );
        new idx = mysql_fetch_int();
		if( mysql_num_rows( ) == 1 )
		{
		   
			    zINFO[ playerid ][ id ] = idx;
		    	LOGIN_DIALOG( playerid );
			
		}
		else
		    REGISTER_DIALOG( playerid );

		mysql_free_result( );


		AC_SetPlayerPos(playerid, 1676.1924,1448.4390,10.7852);
		SetPlayerCameraPos(playerid, 2274.3074,1562.6896,77.7907);
		SetPlayerCameraLookAt(playerid,1734.9033,1450.4108,14.2906);
		InterpolateCameraPos(playerid, 2274.3074,1562.6896,77.7907, 1734.9033,1450.4108,14.2906, 30000, CAMERA_MOVE);
		ClearScreen( playerid );
		SendClientMessage(playerid,-1,"{08DB07}« {FFFFFF}Sveiki prisijungж б {08DB07}Las-Vegasas.LT{FFFFFF} serveri!{08DB07} »");
        SendClientMessage(playerid,-1,"{08DB07}« {FFFFFF}Бraрykite slaptaюodб kurб бraрлte registracijos metu, kad galлtumлme jus atpaюinti. {08DB07}»");
        SendClientMessage(playerid,-1,"{08DB07}« {FF0000}PERKANT KREDITШ GAUNATE 40 PROC. DAUGIAU! {08DB07}»");

	}
	if( zINFO[ playerid ][ logged ] )
	{
	    SendClientMessage(playerid, -1, "{b9d770}[ KICK ]{FFFFFF} Jыs iрmestas uю F4 naudojimа!");

		Kick_( playerid );
	
	}
	return 1;
}
Reply
#8

You don't have any classes added @ OnGameModeInit, add one. (AddPlayerClass)
Reply
#9

Oh....Thanks, I'll try to add.
Reply
#10

Quote:
Originally Posted by JaKe Elite
Посмотреть сообщение
You don't have any classes added @ OnGameModeInit, add one. (AddPlayerClass)
Thing is... How to add it? I'm new scripter so...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)