28.12.2012, 23:24
Well, I tried to spawn player on her house with SQLite, but this code don't work:
Nothing happens with the player, but the message is sent!
Someone help me please? thanks
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;
}
Someone help me please? thanks