Need help with spawn -
Juockis - 20.09.2016
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...
Re: Need help with spawn -
ArianGubetini - 22.09.2016
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.
Re: Need help with spawn -
Threshold - 23.09.2016
Can't remember what causes this. Do you have AddPlayerClass lines in your OnGameModeInit callback?
Re: Need help with spawn -
Dayrion - 23.09.2016
Try to add this:
PHP код:
TogglePlayerSpectating(playerid, false);
on OnPlayerRequestClass.
Re: Need help with spawn -
JaKe Elite - 23.09.2016
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.
Re: Need help with spawn -
Juockis - 23.09.2016
Thanks guys, I hope it will help me to fix it.I'll post some pictures of script in no time.
Re: Need help with spawn -
Juockis - 23.09.2016
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;
}
Re: Need help with spawn -
JaKe Elite - 23.09.2016
You don't have any classes added @ OnGameModeInit, add one. (AddPlayerClass)
Re: Need help with spawn -
Juockis - 23.09.2016
Oh....Thanks, I'll try to add.
Re: Need help with spawn -
Juockis - 23.09.2016
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...