Phone system - Variables
#1

Hey lovely scripters.

I've decided to make a phone system, different than all other phone systems.
However, before i can do that, i need to make sure i understand the variables well enough to do it.

I'm here to ask if and of you could explain to me, a very simple system of connecting 2 players with each other.


I'm sorry to ask this, but i've been looking at tutorials, and i couldn't find any that explains a phone system.

I hope one of you will help me on this
Reply
#2

pawn Код:
new IsonThePhone[MAX_PLAYERS] = -1; //Set this to the ID they're on the phone with.
That's really all I can contribute, it's really easy to connect two players.

Quote:
Originally Posted by Nazi Germany
This forum requires that you wait 120 seconds between posts. Please try again in 39 seconds.
Mother F-....
Reply
#3

I'm still a bit confused.
Should the person calling and the person receiving have the variable IsOnThePhone[MAX_PLAYERS] set to -1 ?

What if 4 peoples are connected to IsOnThePhone? :/
Reply
#4

Give up.
Reply
#5

pawn Код:
IsDialing[MAX_PLAYERS]; // When typing Call command.
IsCalling[MAX_PLAYERS]; // When remote Id answers.

command(call, playerid, params[])
{
     new string[128], pID;
     if(sscanf(params, "u", pID)) return SendClientMessage(playerid, 0x0, "Usage : /call [ Player Name / ID ]");
     if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, 0x0, "This player is not connected");
     if(IsDialing[playerid] != -1) return SendClientMessage(playerid, 0x0, "You are already dialing someone!");
     IsDialing[playerid] = pID;
     format(string, sizeof(string), "%s is calling you, type /answer to answer", GetName(playerid));
     SendClientMessage(pID, 0x0, string);
     format(string, sizeof(string), "You are now dialing %s", GetName(pID));
     return SendClientMessage(playerid, 0x0, string);
}
Reply
#6

Not a chance, champ.

I'm making a scratchmade script and that is no problems for me.
I just never understood how exactly the variables works in a phone system - which is why i'm here.
Reply
#7

If you don't understand how an array works, I doubt your "scratchmade script" is very good, "champ".
Reply
#8

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
If you don't understand how an array works, I doubt your "scratchmade script" is very good, "champ".
Everyone has to start somewhere right ? being impolite won't help making his gamemode "good".
Though, i get your point.
Reply
#9

Cameltoe, I just think he should aim lower whilst he is still learning.
Reply
#10

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
Cameltoe, I just think he should aim lower whilst he is still learning.
Agree.

Look here, some of the sources i used when starting off :

#1 The SA-MP Pawn Bible, this is your #1 resource
#2 The tutorials section
#3 The magical search button
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)