Problem with house spawn
#1

Well, I tried to spawn player on her house with SQLite, but this code don't work:

pawn Код:
public OnPlayerSpawn(playerid) {
    new
        DBResult: result,
        str[100],
        str2[50]
    ;
    format(str, sizeof str,"select id from owners where name = '%s'",db_escape(GetPlayerNameEx(playerid)));
    result = db_query(sqlite_,str);
    db_get_field_assoc(result, "id", str2, sizeof str2);
    db_free_result(result);
    SetPlayerPos(playerid, HouseInfo[strval(str2)][INTX], HouseInfo[strval(str2)][INTY], HouseInfo[strval(str2)][INTZ]);
    SetPlayerInterior(playerid, HouseInfo[strval(str2)][INT]);
    SetPlayerVirtualWorld(playerid, HouseInfo[strval(str2)][VW]);
    SendClientMessage(playerid,-1,"debug");
    return 1;
}
Nothing happens with the player, but the message is sent!
Someone help me please? thanks
Reply
#2

Someone help me? :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)