[Tutorial] Make a phone system (EASY WAY)
#1

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
Reply


Messages In This Thread
How to make a phone system (VERY EASY) - by ACI - 15.02.2014, 16:04
Re: Make a phone system (EASY WAY) - by UnknownOwner - 15.02.2014, 17:42
Re: Make a phone system (EASY WAY) - by redneckvideogamer - 15.02.2014, 18:14
Re: Make a phone system (EASY WAY) - by ACI - 16.02.2014, 10:19
Re: Make a phone system (EASY WAY) - by UnknownOwner - 16.02.2014, 11:14
Re: Make a phone system (EASY WAY) - by J4mmyHD - 16.02.2014, 12:47
Re: Make a phone system (EASY WAY) - by ACI - 16.02.2014, 17:01
Re: Make a phone system (EASY WAY) - by ACI - 19.02.2014, 09:50
Re: Make a phone system (EASY WAY) - by Clad - 19.02.2014, 09:51
Re: Make a phone system (EASY WAY) - by Riddy - 19.02.2014, 10:01

Forum Jump:


Users browsing this thread: 3 Guest(s)