Problem with house spawn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with house spawn (
/showthread.php?tid=403072)
Problem with house spawn -
Rodrigo. - 28.12.2012
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
Re: Problem with house spawn -
Rodrigo. - 29.12.2012
Someone help me? :/