14.01.2015, 20:39
Seguinte..quando eu vou registrar uma conta nova.. o player cai pra debaixo do mapa ao invez de ele cair aonde e o spawn padrao do server...
ONPLAYERSPAWN
ONPLAYERREQUESTCLASS
ONPLAYERSPAWN
pawn Код:
public OnPlayerSpawn(playerid)
{
if(Logado[playerid] == false)
{
Msg(playerid, Vermelho, "- INFO - {FFFFFF} Vocк Precisa se Logar Primeiro para Spawnar!");
return Kick(playerid);
}
if(FirstSpawn[playerid] == true)
{
TextDrawOn(playerid);
FirstSpawn[playerid] = false;
}
if(UsandoPos[playerid] == true)
{
new Float:LoadPos[3], Float:LoadAngle;
format(StringRegistro, sizeof(StringRegistro), "ZP/Contas/%s.txt", Nome(playerid));
LoadPos[0] = DOF2_GetFloat(StringRegistro, "PosX");
LoadPos[1] = DOF2_GetFloat(StringRegistro, "PosY");
LoadPos[2] = DOF2_GetFloat(StringRegistro, "PosZ");
LoadAngle = DOF2_GetFloat(StringRegistro, "Angle");
SetPlayerPos(playerid, LoadPos[0], LoadPos[1], LoadPos[2]);
SetPlayerFacingAngle(playerid, LoadAngle);
}
if(ContaPlayer[playerid][Skin] > 0)
{
SetPlayerSkin(playerid, ContaPlayer[playerid][Skin]);
}
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, IntroTD[playerid][0]);
TextDrawHideForPlayer(playerid, IntroTD[playerid][1]);
StopAudioStreamForPlayer(playerid);
KillTimer(CarregarObj[playerid]);
CarregarObj[playerid] = SetTimerEx("ObjetosLoad", 3000, true, "d", playerid);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~w~Aguarde...", 2000, 5);
return 1;
}
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
TextDrawShowForPlayer(playerid, IntroTD[playerid][0]);
TextDrawShowForPlayer(playerid, IntroTD[playerid][1]);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2231.1509,-1739.5239,481.5005);
SetPlayerFacingAngle(playerid,90);
SetPlayerCameraPos(playerid,-2234.3159,-1736.0182,480.8139);
SetPlayerCameraLookAt(playerid,-2231.1509,-1739.5239,481.5005);
ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
CreateExplosion(-2231.1509,-1739.5239,481.5005, 12, 10.0);
return 1;
}