17.11.2011, 06:43
Podrнas comprobar si existe o no la cuenta. Serнa algo asн...
Entonces, si la cuenta existe lo Spawnea directamente.
PD: No lo probй, pero deberнa funcionar.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
new query[200], nombre[MAX_PLAYER_NAME];
GetPlayerName(playerid, nombre, sizeof(nombre));
format(query, sizeof(query), "SELECT IP FROM `playerdata` WHERE user = '%s' LIMIT 1", nombre);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows()) SpawnPlayer(playerid);
SetPlayerPos(playerid, 2370.5166,2165.1321,26.9844);
SetPlayerCameraPos(playerid, 2374.5188,2169.5798,26.9844);
SetPlayerCameraLookAt(playerid, 2370.5166,2165.1321,26.9844);
SetPlayerFacingAngle(playerid,315.9228);
ApplyAnimation(playerid,"DANCING","dnce_M_b",4.1,7,5,1,1,1);
return 1;
}
PD: No lo probй, pero deberнa funcionar.