Camera Position When Joining -
HondaCBR - 24.04.2011
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome");
SetPlayerCameraPos(playerid,2798.9133,1275.4282,18.7500);
SetPlayerCameraLookAt(playerid,2832.5659,1259.2179,10.7761);
SetPlayerPos(playerid,2833.4421,1265.7426,10.7773);
pawn Код:
SetPlayerCameraPos(playerid,2798.9133,1275.4282,18.7500);
SetPlayerCameraLookAt(playerid,2832.5659,1259.2179,10.7761);
SetPlayerPos(playerid,2833.4421,1265.7426,10.7773);
I have camera position in those places, when i join my server i get the welcome message but the camera still stays where it always does :/ I dont get how because those are the only setplayercamerapos cords in my map, so does any one know how can i change it?
Re: Camera Position When Joining -
Nexotronix - 24.04.2011
Try This!
pawn Код:
new bool:PlayerWelcome[MAX_PLAYERS];
new welcomeTimer[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
if(!PlayerWelcome[playerid])
{
//here yor settings
return 0;
}
//here another setting
return 1;
}
public OnPlayerConnect(playerid)
{
PlayerWelcome[playerid] = false;
welcomeTimer[playerid] = SetTimerEx("WelcomeCamera",5000,false,"i",playerid);
return 1;
}
forward WelcomeCamera(playerid);
public WelcomeCamera(playerid);
{
PlayerWelcome[playerid] = true;
return 1;
}
Re: Camera Position When Joining -
HondaCBR - 24.04.2011
can i just ask, how is this going to change it?
Re: Camera Position When Joining -
HondaCBR - 24.04.2011
the public part has errors:
Код:
error 055: start of function body without function header
error 010: invalid function or declaration
Re: Camera Position When Joining -
Nexotronix - 24.04.2011
updated code
pawn Код:
new bool:PlayerWelcome[MAX_PLAYERS];
new welcomeTimer[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
if(!PlayerWelcome[playerid])
{
//here yor settings
return 0;
}
//here another setting
return 1;
}
public OnPlayerConnect(playerid)
{
PlayerWelcome[playerid] = false;
welcomeTimer[playerid] = SetTimerEx("WelcomeCamera",5000,false,"i",playerid);
return 1;
}
forward WelcomeCamera(playerid)
public WelcomeCamera(playerid);
{
PlayerWelcome[playerid] = true;
return 1;
}
without errors
Re: Camera Position When Joining -
HondaCBR - 24.04.2011
still have the exact same errors
pawn Код:
forward WelcomeCamera(playerid)
public WelcomeCamera(playerid);
{//first error this line
PlayerWelcome[playerid] = true;
return 1;//second error this line
}
wierd errors on return 1; and } :/
Re: Camera Position When Joining -
HondaCBR - 24.04.2011
maybe a different idea of chaning it someone?
Re: Camera Position When Joining -
CrazyBlob - 24.04.2011
under request class
Код:
SetPlayerCameraPos(playerid,2798.9133,1275.4282,18.7500);
SetPlayerCameraLookAt(playerid,2832.5659,1259.2179,10.7761);
SetPlayerPos(playerid,2833.4421,1265.7426,10.7773);
and under onplayerconnect
Код:
SendClientMessage(playerid, COLOR_GREEN, "Welcome");
Re: Camera Position When Joining -
HondaCBR - 24.04.2011
look at my first message right at the top, i already got it there