01.10.2016, 08:54 
	
	
	
		Hello there people! I have a really serious problem which I can't deal with. When I spawn, my server crashes.
OnPlayerSpawn:
If I solve my problem, the helper gets a rep from me.
	
	
	
	
OnPlayerSpawn:
PHP код:
public OnPlayerSpawn(playerid)
{
    new
        Query[250],
        DBResult: Result,
        pName[250],
         Field[20],
        Field2[20],
         Field3[20],
        Field4[20]
    ;
    GetPlayerName(playerid, pName, sizeof(pName));
    
    format(Query, sizeof(Query), "SELECT * FROM `Accounts` WHERE Name = '%s'", DB_Escape(pName));
    Result = db_query(Database, Query);
    db_get_field_assoc(Result, "Skin", Field, 30);
    SetPlayerSkin(playerid, strval(Field));
    
    db_get_field_assoc(Result, "Interior", Field, 30);
    SetPlayerInterior(playerid, strval(Field));
    
    db_get_field_assoc(Result, "Angle", Field, 30);
    SetPlayerFacingAngle(playerid, strval(Field));
    
    db_get_field_assoc(Result, "Skin", Field, 30);
    SetPlayerSkin(playerid, strval(Field));
    
    db_get_field_assoc(Result, "X", Field2, 30);
    format(Field, sizeof(Field2), "%f", Field2);
    
    db_get_field_assoc(Result, "Y", Field3, 30);
    format(Field, sizeof(Field3), "%f", Field3);
    
    db_get_field_assoc(Result, "Z", Field4, 30);
    format(Field, sizeof(Field4), "%f", Field4);
    
    SetPlayerPos(playerid, strval(Field2), strval(Field3), strval(Field4));
    SetCameraBehindPlayer(playerid);
    db_free_result(Result);
     return 1;
} 



