[Help] House loading. - 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: [Help] House loading. (
/showthread.php?tid=482500)
[Help] House loading. -
Ernestas_ - 21.12.2013
Hi. I use MySQL to load houses (X, Y, Z, owner, price, locked).
I'm using this:
PHP код:
while(mysql_retrieve_row()){
Create3DTextLabel(Query, COLOR_BLUE, pos[0], pos[1], pos[2], 10.0, 0, 0);
}
to create 3D label for every house. How I can create entry with F to every house too? I know that I need to use
OnPlayerKeyStateChange but I can't find a solution to make entry with F to every loaded house.
Re: [Help] House loading. -
Ernestas_ - 21.12.2013
Anybody?
Re: [Help] House loading. -
Tayab - 21.12.2013
Here is basic idea.
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playeid,2,x,y,z))
{
//enter him
}
}
Re: [Help] House loading. -
Ernestas_ - 21.12.2013
Quote:
Originally Posted by Tayab
Here is basic idea.
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK) { if(IsPlayerInRangeOfPoint(playeid,2,x,y,z)) { //enter him } }
|
I found simple sulution: I made same MySQL query in
OnPlayerKeyStateChange public. Can anybody tell me if it will be ok? Won't it lag the server?