SA-MP Forums Archive
How to - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to (/showthread.php?tid=275754)



How to - Abreezy - 10.08.2011

Let's say i decided to make an entrance and exit system, via mysql, and if the player is in range of an entrance thats on the db, they can enter. I wanted to use the crouch for entrances, which i think i could handle. My only problem is how to make the if in range of based of a database? I want to use it to save a custom name for place, enter x,y,z, interior, vw, exit x,y,z, and if locked or not. I can handle making the database and saving/loading it, i just dont know how to make it read from db on if in range of or w/e the function is.

Thanks in advance


Re: How to - Zonoya - 10.08.2011

IsPlayerInRangeOfPoint


Re: How to - Abreezy - 10.08.2011

I know that, but i want it get the coords from a database.


Edit: i think i have an idea.


Re: How to - Zonoya - 10.08.2011

hmm cords from the database Download a interior FS Script


Re: How to - mprofitt - 11.08.2011

Quote:
Originally Posted by Abreezy
View Post
I know that, but i want it get the coords from a database.


Edit: i think i have an idea.
You dont want to do this, you need the cooridinates in variables. You can load the variables from the data base during game init.


Re: How to - Abreezy - 11.08.2011

I made the enums easily, as its the fastest part

pawn Code:
enum entrances
{
    ename,
    Float:enterx,
    Float:entery,
    Float:enterz,
    interiorid,
    Float:exitx,
    Float:exity,
    Float:exitz
}
new entrance[MAX_PLAYERS][entrances];
Now , i just need a way to make "Create3Dtext" using the enterx, y, z and when you get close to them via IsPlayerInRangeOfPoint and you crouch, you enter the "interiorid". Can someone tell me how to do that