SA-MP Forums Archive
[FilterScript] Real Phone Signal System (Use Pvars to link to your Own Script) - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Real Phone Signal System (Use Pvars to link to your Own Script) (/showthread.php?tid=602890)



Real Phone Signal System - AdrianG - 14.03.2016


Hello folks, I've created a FS Simple & Usefull (I find it) as Real Phone Signal
Bellow is a Video Tutorial:

http://www.youtube.com/watch?v=aF7ektcOLM0


Pvars (Use them to link my FS to your Own Script)
PHP Code:
GetPVarInt(playerid,"Signal"); - returns an integerthe lines of the signal strength of playerid.
GetPVarInt(playerid,"TowerID");  - returns an integerto which Signal Tower ID is connected playerid.
GetPVarFloat(playerid,"TowerDistance"); - returns a floatthe distance between player and connected Signal Tower 
How can Pvars help you? Simple. Use them in your script like call, sms etc. For instance if one of two players has low signal 'cut' some letters from message. Or if a player is a connected to a tower id (countryside for instance) create additional cost for roaming or smth like that
P.S.:
PHP Code:
Script will create automatically create a file called "stations" in scriptfiles in order to save the data about signal towers.
The limit of Signal Towers is by default 25you can change it as you want from FS.
The Update of the Signal Lines is by default at each 3 secondsyou can change it, as your server host allows (or as you want 

Download Link (updated): Click Here


Pastebin Link: Click Here




Re: Real Phone Signal System (Use Pvars to link to your Own Script) - AdrianGabriel96 - 15.03.2016

Good job my mate!


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - Ducati - 15.03.2016

Nyc.


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - AdrianG - 15.03.2016

thanks, first FS posted online


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - Bolex_ - 15.03.2016

Nice Work


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - AdrianG - 15.03.2016

Quote:
Originally Posted by Scripter18
View Post
Nice Work
Thanks bro


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - Pottus - 15.03.2016

You could do things a lot better here there is really no need for an update timer when you could just use dynamic areas and only update when a player actually needs to be updated. I would also advise against using pvars in loops this is never a good practice. In fact get rid of them completely CallRemoteFunction() is what you want to be using just make some public getter functions.


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - AdrianG - 15.03.2016

Ok. Thanks for advice. I will do it in v2


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - Pottus - 15.03.2016

Yeah it makes sense to only update when you actually need to instead of making assumptions.


Re: Real Phone Signal System (Use Pvars to link to your Own Script) - AdrianG - 15.03.2016

Quote:
Originally Posted by Pottus
View Post
Yeah it makes sense to only update when you actually need to instead of making assumptions.
As I said, it is my first FS, everything has beginning ( I guess)