How to create a simple phone system?
#1

Well I'm working on a Prison Script and I'm trying to create a system that you can smuggle phones.
But I can't figure out how to create a good and simple phone system.
Can anyone help me?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=447813
If you need someone to make it for you.
Reply
#3

I want to do it myself so I can learn scripting quicker.
Reply
#4

Basically you could make players have a place to buy phone,like somewhere in the prison,where they could take it.
And then they could sell it to other players,if that's something like your idea?
I mean,where do you want your players to get phones first?
Reply
#5

To smuggle it in the prison.
But I need to know how to create the call/sms system, I know how to create a smuggle point etc.
And with random numbers or so.
Reply
#6

Basically,if player has a phone,he would enter a number in the command (/call [NUMBER]) then the player who has that number would recieve a message he is beeing called,and that he needs to pick up to answer (/answer for example).Then whatever the player who called says it would be transfered to the person who answered.

Basically that's just the idea.
And about the random numbers,just make a random number . For example
Код:
new PhoneNum[MAX_PLAYERS]
new randomNumber = random(RANGE OF NUMBERS);
//When a player gets his phone,set the number value to something:
PhoneNum[playerid]=randomNumber;
//Also loop through players,and check if someone already has that number,to avoid bugs,just in case...
Reply
#7

Yeah, but I need to know how to write a call/sms system..
Reply
#8

I need it for Zcmd, can anyone please help me..

I Need to create a call/sms system + a random phone number combination.
Reply
#9

Hmm, never done this before but i'm pretty sure I know how to do it. Add a part to your enum that has pHasPhone and pPhoneNumber. If pHasPhone == 1, then make it generate a random number. Add something in OnPlayerText so if IsInACall == 1, then format then SendClientMessage. It shouldn't be too hard, if you need me to whip up a working example just ask.
Edit: I also recommend that you look at existing scripts and learn something from them.
Reply
#10

Thanks I'm gonna try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)