[HELP]About gates!
#1

I know to create gate in pawno but i dont know how to create gate who will take money like;

when i type /toll gate to open and i to loose -50$
Reply
#2

Alright.
  1. Whats exactly your problem? What do you want to do?
  2. Did you script something yet?
  3. Got any coord's or other useful information?
Reply
#3

Just do on the command for when he types /toll make it GivePlayerMoney(playerid,-50);
Together with all the other code.
Reply
#4

Quote:
Originally Posted by oliverrud
Посмотреть сообщение
Just do on the command for when he types /toll make it GivePlayerMoney(playerid,-50);
Together with all the other code.
Depends if he wants it to be called with some special things, like when he is just in a certain area, etc.
Reply
#5

Just add : IsPlayerInRangeOfPoint
Reply
#6

He's asking about HOW you make a gate, it shall could open on that /toll gate cmd, and should take 50 dollars from you when you use it.. - I would etll you if I did know how to.. xD
Reply
#7

To make gates, you need to store the variables. something like

pawn Код:
new gate;

public OnGameModeInit()
{
    gate = CreateObject(988, 0.0, 1.1, 10.859, 0.0, 0.0, -90.0); // Gate
    return 1;
}

public OnPlayerCommandText(playerid,cmdtext)
{
    if (!strcmp(cmdtext,"/open",true))
    {
        MoveObject(gate, 0.0, 6.1, 10.859, 4.0);
        return 1;
    }
    if (!strcmp(cmdtext,"/close",true))
    {
        MoveObject(gate, 0.0, 1.1, 10.859, 4.0);
        return 1;
    }
    return 0;
}
That makes a basic command driven gate. To make a ranged gate, you need timers checking IsPlayerInRangeOfPoint to open and close, and of course, take the 50$ to open it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)