29.09.2018, 03:07
I'm trying to put the camera position somewhere more always going to that same place.
How can I solve this?
How can I solve this?
PHP Code:
forward OnLogin(playerid);
public OnLogin(playerid)
{
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
mysql_format(g_Read, query, sizeof(query), "SELECT * FROM `accounts` WHERE `Name` = '%s' LIMIT 1", GetName(playerid));
mysql_tquery(g_Read, query, "LoadAccount", "i", playerid);
SendClientMessage(playerid, COLOR_TESTT, "Debes elegir un equipo para jugar.");
IsConnected[playerid] = 1;
new string[MAX_STRING_MSG], plrIP[16], country[25];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
GetPlayerCountry(playerid, country, sizeof(country));
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsConnected[i] == 1 && PlayerInfo[i][pAdmin] >= 2)
{
format(string, sizeof(string), "%s se uniу al servidor. {FA5858}[IP : %s | Pais : %s]", GetName(playerid), plrIP, country);
SendClientMessageToAdmins(string);
}
}
Log_Write("logs/connexion.txt", "[%s] %s se conectу al servidor. [IP : %s]", ReturnDate(), GetName(playerid), plrIP);
SetPlayerCameraPos(playerid, 1269.0106,-1220.9059,52.3422);
SetPlayerCameraLookAt(playerid, 1210.0986,-1312.1886,52.3422);
SetTimerEx("textdrawinit", 1000, true, "i", playerid); // On initialise les textdraws
return 1;
}
else
{
Dialog_Show(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Conexiуn", ""C_RED"Usted ha ingresado una contraseсa invбlida.\n"COL_WHITE"Por favor ingrese su contraseсa para iniciar sesiуn.", "Login", "Salir");
return 1;
}
//return 1;
}