public OnPlayerRequestClass(playerid, classid)
{
SetPlayerCameraPos(playerid, -2595.5474,1381.4757,7.1205);
SetPlayerCameraLookAt(playerid, -2601.6477,1408.5997,7.2681);
SetPlayerFacingAngle(playerid, 193.6051);
SetPlayerPos(playerid, -2601.6099,1392.1543,7.1442);
SpawnPlayer(playerid);
darSpawn(playerid);
return 1;
}
//
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid, 0);
SetPlayerSkin( playerid, Player[ playerid] [ Skin ]);
SetPlayerPos(playerid, 1153.7780,-1758.9849,13.6673);
return 1;
}
// na dialog de Login, apуs o player por sua senha corretamente, tem isso:
SpawnPlayer(playerid);
darSpawn(playerid);
// e a stock darSpawn
stock darSpawn(playerid)
{
SetSpawnInfo(playerid, 0, Player[playerid][Skin], 1153.7780,-1758.9849,13.6673,355.0100,0,0,0,0,0,0);
SpawnPlayer(playerid);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(!IsPlayerLogged(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Vocк sу poderб spawnar depois de Logar / Registrar.");
return 1;
}
Coloque isto na Callback informada
PHP код:
|
SetSpawnInfo(playerid, 0, Player[playerid][Skin], 1153.7780,-1758.9849,13.6673,355.0100,0,0,0,0,0,0);
SpawnPlayer(playerid);
new bool:Logado[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerCameraPos(playerid, -2595.5474,1381.4757,7.1205);
SetPlayerCameraLookAt(playerid, -2601.6477,1408.5997,7.2681);
SetPlayerFacingAngle(playerid, 193.6051);
darSpawn(playerid);
return 1;
}
stock darSpawn(playerid)
{
if(!Logado[playerid])
{
Logado[playerid] = true;
SetSpawnInfo(playerid, 0, Player[playerid][Skin], 1153.7780,-1758.9849,13.6673,355.0100,0,0,0,0,0,0); //sempre que logar irб dar spawn nessa posiзao.
SpawnPlayer(playerid);
return 1;
}
else
{
//Posiзгo do Hospital, exemplo:
//SetPlayerPos(playerid, 0.0, 0.0, 3.0);
//SetPlayerInterior(playerid, 0); //Interior do hospital, se nгo for interior, mantйm o 0.
//SendClientMessage(playerid,-1,"Vocк deu Spawn no Hospital!"); //Mensagem sу para vocк entender.
return 1;
}
}