OnPlayerConnect is bugged?!!
#1

Why its doesn't work onplayerconnect,
Код:
	TextDrawShowForPlayer(playerid, openBlackscreen);
	TextDrawShowForPlayer(playerid, openBlackscreen2);
	TextDrawShowForPlayer(playerid, openRedscreen);
	TextDrawShowForPlayer(playerid, openText);
	TextDrawShowForPlayer(playerid, openText2);

	SetPlayerPos(playerid, 2019.0272, -3302.2915, 27.0856);
	SetPlayerWeather(playerid, 19);
	SetPlayerTime(playerid, 20, 0);
	InterpolateCameraPos(playerid,
	2019.0272,
	-3302.2915,
	27.0856,
	1870.6890,
	-3251.9998,
	27.8833,
	30*1000, CAMERA_MOVE);
	
	InterpolateCameraLookAt(playerid,
	1982.3898,
	-3277.1060,
	17.5022,
	1919.5918,
	-3252.5857,
	12.9506,
	30*1000, CAMERA_MOVE);
Reply
#2

What's the actual problem? is there an error, if so please show us the code.
Reply
#3

The actual problem is that its not apply the commands

SetPlayerPos
SetPlayerWeather
and SetPlayerTime

Its exist but its just like not exist (instead of seeing this i see the regular login screen (the builtin before spawning)
Reply
#4

Players must first be spawned before you can set their position ect. You can't do it under OnPlayerConnect.
Reply
#5

did you add TogglePlayerClock(playerid, 1); before SetPlayerTime?
Reply
#6

I think the code is in the incorrect callback but I'm not entirely sure. Try placing the code under

pawn Код:
public OnPlayerSpawn(playerid)
It's worth a try but I'm not 100% sure. If the code is fine, no errors and it compiles. Then I'm pretty sure it's under the incorrect callback.


Quote:
Originally Posted by iggy1
Посмотреть сообщение
Players must first be spawned before you can set their position ect. You can't do it under OnPlayerConnect.
EDIT: Yes, so I am right. That's true, the player MUST be spawned before setting anything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)