How to make a toll
#1

Okay so i know HOW to make the toll. I just dont know how to make it where when you drive up to it it takes 10 bucks then goes back down. Like automatic.
Reply
#2

Make a pickup or something then do

pawn Код:
EX.

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == toll)
  {
  GivePlayerMoney(playerid,-10);
  SendClientMessage(playerid,COLOR_,"[Server] You paid the 10$ toll fee.");
  }
  return 1;
}
I am not going to code you a gate or anything, because like you said you know what to do, which is a complete total lie and you would just copy paste and you wouldn't learn anything.
Reply
#3

You could also use IsPlayerInArea.
Reply
#4

How would that help at all?
Reply
#5

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Make a pickup or something then do

pawn Код:
EX.

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == toll)
  {
  GivePlayerMoney(playerid,-10);
  SendClientMessage(playerid,COLOR_,"[Server] You paid the 10$ toll fee.");
  }
  return 1;
}
I am not going to code you a gate or anything, because like you said you know what to do, which is a complete total lie and you would just copy paste and you wouldn't learn anything.
Is A Toll Code That Simple :O

EDIT: i was thinking area too with /command and moving gate xD
Reply
#6

That is the second "easy" way.
Reply
#7

Quote:
Originally Posted by Vandooz
Посмотреть сообщение
That is the second "easy" way.
So what is most easiest TOLL code besides that one
Reply
#8

Quote:
Originally Posted by <Weponz>
Посмотреть сообщение
So what is most easiest TOLL code besides that one
That what you'd said before my post, i did forget to put your post-quote in it.
Reply
#9

You don't need IsPlayerInArea...

Create function to close
Command > IsPlayerInRangeOfPoint > Move Object > Take money > Timer to call close function.
Reply
#10

I want when you drive up to the toll it opens.
I know about move object and all. But how do i trigger is?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)