Quote:
Originally Posted by ethhackerman
i think the x,y,z is not right re add the x,y,z
|
They are right, I checked them multiple times also it's working on the login dialog.
Quote:
Originally Posted by -=Dar[K]Lord=-
Use
pawn Код:
SetCameraBehindPlayer(playerid);
This will set the camera behind player , this might work ...
|
Tried it before and it Didn't work, Thanks anyway
Quote:
Originally Posted by dannyk0ed
Don't use OnPlayerConnect.
Try placing it under OnPlayerSpawn
|
It's called when player connect, How can I put it under on player spawn, Here is the full code
also I wanna different spawn coords for other stuff, Like when player dies or in minigames
Код:
public OnPlayerConnect(playerid)
{
if(!fexist(Jfile))
{
format(Jstring, sizeof(Jstring),"Nick name \"%s\" isn't registered\nEnter the password:", JGetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Register an account!", Jstring, "Register", "Kick");
}
else
{
pInfo[playerid][Registered] = 1;
format(Jfile, 100, ACCOUNTS_PATH, JGetName(playerid));
INI_ParseFile(Jfile, "GetPlayerInfo", .bExtra = true, .extra = playerid);
if(pStat[playerid][pAutoLogin] == 1 && (!strcmp(pIP, pInfo[playerid][IP],true)))
{
format(Jfile, 100, ACCOUNTS_PATH, JGetName(playerid));
INI_ParseFile(Jfile, "LoginPlayer", .bExtra = true, .extra = playerid);
SendClientMessage(playerid,orange,"You have been automatically logged In, Type /Autologin to disable it.");
pInfo[playerid][Logged] = 1;
//SetCameraBehindPlayer(playerid); Tried before and didn't work
//TogglePlayerSpectating(playerid, 0); ^^
SetSpawnInfo( playerid, 0, 0, PosX[playerid], PosY[playerid], PosZ[playerid], Angle[playerid], 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
}