[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
#2

Nice
Reply
#3

Very nice job, great to see that you added a tutorial to your include!
Reply
#4

Thanks everyone..
Reply
#5

TIP: You could have change CommercialTowers to Payphones as it looks more realistic in my opinion, anyways nice job!
Reply
#6

Nice.
Reply
#7

Thanks for your support.
Reply
#8

Edited the topic..
Reply
#9

Very nice
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)