How to make a phone system (VERY EASY) -
ACI - 15.02.2014
How to make a phone system
with
San Andreas Telecom
Here is the include: https://sampforum.blast.hk/showthread.php?tid=494796
Short Introduction
Its just a powerful include with in-built functions and in-built system for calling, and more!.. This tutorial will be a short tutorial on understanding how does this include works. First, before reading this tutorial, please read the original thread of the include:
https://sampforum.blast.hk/showthread.php?tid=494796 - this will make it MORE easy for you to understand this tutorial.
Deployment
Okay, lets start to create a telephone tower.. This will be a medium for calling..
pawn Код:
public OnGameModeInit()
{
CreateCommercialTower(1,1877.7667,-2545.0544,13.5469 + 8.0, 40.0, "Tower Name\nIn Range!"); // This will create a tower on LS airport.
return 1;
}
If you want to get the total number of towers, then you will just have add this:
pawn Код:
main()
{
printf("Total towers active: %i", GetTotalTowers());
}
Then put this command in your mode:
pawn Код:
#define ASI_STC_INBUILT
CMD:call(playerid, params[])
{
new ID;
if(!sscanf(params, "r", ID))
{
if(IsPlayerInRangeOfAnyTower(playerid))
{
SendClientMessage(playerid, -1, "You have been connected! Say 'Hello'!");
CallPlayerForPlayer(playerid, ID);
}
else SendClientMessage(playerid, -1, "You need to be near a tower...");
}
else SendClientMessage(playerid, -1, "USAGE: /call (target)");
return 1;
}
Then test it near the tower in LS airport. Note that this will only work if you see the tower's name.
Enjoy
Re: Make a phone system (EASY WAY) -
UnknownOwner - 15.02.2014
Nice
Re: Make a phone system (EASY WAY) -
redneckvideogamer - 15.02.2014
Very nice job, great to see that you added a tutorial to your include!
Re: Make a phone system (EASY WAY) -
ACI - 16.02.2014
Thanks everyone..
Re: Make a phone system (EASY WAY) -
UnknownOwner - 16.02.2014
TIP: You could have change CommercialTowers to Payphones as it looks more realistic in my opinion, anyways nice job!
Re: Make a phone system (EASY WAY) -
J4mmyHD - 16.02.2014
Nice.
Re: Make a phone system (EASY WAY) -
ACI - 16.02.2014
Thanks for your support.
Re: Make a phone system (EASY WAY) -
ACI - 19.02.2014
Edited the topic..
Re: Make a phone system (EASY WAY) -
Clad - 19.02.2014
Very nice
Re: Make a phone system (EASY WAY) - Riddy - 19.02.2014
Not much of a tutorial is it? You've not explained anything.
You're better off placing this in the include thread, since this isn't explaining how your include works, rather how to use it, and even in that form, it isn't very detailed.