![]() |
#1 |
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2013
Posts: 357
Reputation: 38
|
![]() San Andreas Telecom >>> S.T.C <<< >> v0.1 - Alpha << Here is a tutorial: http://forum.sa-mp.com/showthread.php?t=494995 Please read it fully - don't scroll down quickly! It will take 5 minutes to read the full topic! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ Introduction This a source which provides in-built functions for scripting a phone system. Using this will be a good idea for an average scriptwriter, or lower, or the one who demands this. This also provides a function for creating towers. There are two types of towers; one is a commercial tower, and other is a non commercial tower. Since its the very first version of this source, the towers don't have an in-built system - so, you will have to code systems for commercial towers yourself. But this source is also providing a function which gives the player recharge, and a function which gets the current balance of the player. You can use these functions for commercial towers as a medium for calling. Then, the total money taken by the player can be saved in a file. When the owner of the tower, enters the game, he can be given the money which he earned by his charges set for calling. This can also be called as "business". This also provides an in-built code for OnPlayerText; means that you wont need to code OnPlayerText for this calling system. If you want to code it in an other way, then you can remove the hooked function. Since this version is the very first version (Alpha release), it might be volatile to your server in one way; creating towers without a name - I'll explain this later, for now, keep reading... And I've tested this alone. Functions This source provides greater than 16 functions. Some are untested. pawn Code:
Creates a "commercial" tower. The only thing which makes it commercial is that it tells the server that "I am a commercial tower". It also gets created with a 3D text label by "TName[]", so if you set the label to "Zayan's commercial tower - In range!", it will appear as you expected. Its recommended that you set the "Float:Range" greater than 30. Note that the float set for "Float:Range" will be the same for the 3D text. [!] Alert: If "TName[]" is empty, it will crash the server. This is caused because "TName[]" creates an empty 3D text on the coordinates of the tower (subtracted by 5.0). [!] Warning: Keeping the ID Less than 1 or greater than 100 will cause the server to automatically destroy the tower, and you wont be able to see the tower in-game because its destroyed. [!] Note: If you create the tower at a coordinates normally captured by /save, the tower might appear not tall because half of the tower is down the real ground. In easy words, its half might be underground. To fix this is simple, you will have to add little more numbers to "Float:posZ", like "Float:posZ + 3.0". Note that when the tower is created, 5.0 is automatically subtracted to the given Z coordinates. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Creates a "Non Commercial" tower. The only thing which makes it non commercial is that it tells the server that "I am not a commercial tower". It also gets created with a 3D text label by "TName[]", so if you set the label to "Zayan's commercial tower - In range!", it will appear as you expected. Its recommended that you set the "Float:Range" greater than 30. Note that the float set for "Float:Range" will be the same for the 3D text. [!] Alert: If "TName[]" is empty, it will crash the server. This is caused because "TName[]" creates an empty 3D text on the coordinates of the tower (subtracted by 5.0). [!] Warning: Keeping the ID Less than 1 or greater than 100 will cause the server to automatically destroy the tower, and you wont be able to see the tower in-game because its destroyed. [!] Note: If you create the tower at a coordinates normally captured by /save, the tower might appear not tall because half of the tower is below the real ground. In easy words, its half might be underground. To fix this is simple, you will have to add little more numbers to "Float:posZ", like "Float:posZ + 3.0". Note that when the tower is created, 5.0 is automatically subtracted to the given Z coordinates. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Destroys the tower. If the ID of the tower is valid. And wipes out the whole data set for the tower. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Gets the total number of towers currently present in the server. Note that DestroyTower() can effect this. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Checks if the player is in range of a tower. Note that this is called if the player is near the a specific tower. To check if the player is near a specific tower, you'll have to set the tower's ID. If the tower's ID matches with the player's nearest tower ID, its called then. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Checks if the player is in range of ANY tower. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Just like real life. Connects the player to his target. There is also a in-built checks - but if you want to use that in-built checks, you can define: pawn Code:
If defined, you can this function like: pawn Code:
pawn Code:
--------------------------------------------------------------------------- pawn Code:
Disconnects the player if the player is in a conversation (calling). Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Checks if the player is calling. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Recharges the player's balance. It's not similar as GivePlayerMoney - it's actually a script side money. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Gets the player's balance. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
Checks if the tower is commercial, if not, returns 0. Example: pawn Code:
--------------------------------------------------------------------------- pawn Code:
This is untested. This is just used to send a message. If the player is the caller, "iscaller" must be 0. If not, must be 1. [!] Warning: This function wont work if "ASI_STC_UNTESTED" is not defined. Alpha Testers & Beta Testers Alpha Testers:
Developers
Bugs - WE ARE STILL INVESTIGATING - WILL BE UPDATED - Source pawn Code:
Development LOG Code:
<v0.1> 09/02/2014 - Developed the first alpha version. * Web browsing feature will be added in a unknown update. And a WDK will released seperately for ASI. (MAYBE) * WDK can be called as: Website development kit, Webpage development kit, W.W.W development kit. * The next version maybe improved by making it faster via using bits. * GetTowerInfo(..) will be added in an unknown version. * DisconnectPlayerAndTarget(..) will be added n an unknown version. * OnPlayerCall(..) will be added n an unknown version. * A PDT, phone development textdraws, might be added for GUI interface between the player and the phone. For example: creating a 2D tablet on the screen. (MAYBE) Last edited by ACI; 15/02/2014 at 05:07 PM. |
![]() |
![]() |
![]() |
#2 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2011
Location: England :: The Danger Zone
Posts: 1,014
Reputation: 133
|
![]()
This is really useful and although I have yet to use it. The features of it look awesome. Can you elaborate on the WDK seems interesting?
|
![]() |
![]() |
![]() |
#3 |
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2013
Posts: 357
Reputation: 38
|
![]()
Thanks for your support. There is a lot to planfor the future versions.
I will be off to sleep in some time, anyone can leave a reply if he wants. |
![]() |
![]() |
![]() |
#4 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2012
Location: Durres, Albania.
Posts: 1,325
Reputation: 362
|
![]()
It looks cool, good job
![]() |
![]() |
![]() |
![]() |
#5 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2011
Location: England :: The Danger Zone
Posts: 1,014
Reputation: 133
|
![]() |
![]() |
![]() |
![]() |
#6 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Jun 2012
Location: $Location = $this->Location->Finder('United Kingdom');
Posts: 911
Reputation: 40
|
![]()
I have goto admit i would have never made a system in anyway like this.. but thank you for putting all the work in for something that someone would like to use if they don't have the time to do it themselves, me on the other hand.... I'll be doing something for MySQL and around my script like this. (Thanks for the idea too :P)
|
![]() |
![]() |
![]() |
#7 |
Banned
![]() Join Date: Apr 2011
Location: North Africa
Posts: 1,297
Reputation: 365
|
![]()
good job mate!
|
![]() |
![]() |
![]() |
#8 |
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2013
Posts: 357
Reputation: 38
|
![]()
Thanks everyone.
@ Newrth - I will be today looking on WDK |
![]() |
![]() |
![]() |
#9 |
Big Clucker
![]() ![]() Join Date: Dec 2010
Location: east newark nj
Posts: 191
Reputation: 42
|
![]()
nice job ACI
|
![]() |
![]() |
![]() |
#10 |
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2013
Posts: 357
Reputation: 38
|
![]()
Thanks
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Include] k_target - Create a target easily [0.3Z] | kadaradam | Includes | 5 | 25/01/2014 08:24 PM |
How to create a simple phone system? | Spydah | Scripting Help | 14 | 14/11/2013 02:51 PM |
[FilterScript] Smart & Simple - Call Phone System [BR Phone] (Eng+Heb) | BlueRey | Filterscripts | 22 | 01/07/2012 07:44 PM |
[Include] CreateVehicleForPlayer - Use Names to create vehicles, Easily. | iPLEOMAX | Includes | 29 | 28/06/2012 11:59 AM |
Attempting to Create a Phone System | SantarioLeone | Scripting Help | 4 | 23/10/2011 06:18 PM |