SA-MP Forums Archive
[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(QueryCOLOR_BLUEpos[0], pos[1], pos[2], 10.000);

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?