Enter/exit problem
#10

Quote:
Originally Posted by Deal-or-die
Посмотреть сообщение
The yellow marker outside on buildings on single-player is a pickup and it's ID is 1559

So you would have to create the marker however you create your 'bank' or what ever then you'd have to use 'IsPlayerInRangeOfPoint' in a callback which I am not quite sure what you'd put it under.
(Please note that I am not talking TO deal-or-die but simply taking his post as reference)
So apparently it is an object with id 1559. As everyone else gave you the code to enter with a command let me do it with the pickup:

The easiest way to check if a player is in range is to see if the have picked up the pickup. So lets do that:

pawn Код:
new bankPickup; // lets first create the pickup. This is a global variable so it goes outside any callback

OnGameModeInit() {
    bankPickup = CreatePickup(1559, 2, 0.0, 0.0, 4.0); // create the pickup and assign the ID to the variable
}

OnPlayerPickUpPickup(playerid, pickupid) {
 if(pickupid == bankPickup) { // the player has activated the created pickup
  SetPlayerPos(playerid, 0.0, 0.0, 15.0); // Yes, all it does now is just throw the player in the air some more
  SendClientMessage(playerid, 0x00FF00AA, "Welcome to the bank (yea, there is no bank here)"); // send a message so they know what happened
  return 1;
 }
}
And that is how you automate the player to put him inside the 'bank' when they pick up the pickup
Reply


Messages In This Thread
Enter/exit problem - by daastle - 13.09.2012, 15:11
Re: Enter/exit problem - by xMCx - 13.09.2012, 15:18
Re: Enter/exit problem - by daastle - 13.09.2012, 16:14
Re: Enter/exit problem - by daastle - 13.09.2012, 21:48
Re: Enter/exit problem - by Deal-or-die - 14.09.2012, 02:24
Re: Enter/exit problem - by Boooth - 14.09.2012, 02:53
Re: Enter/exit problem - by Deal-or-die - 14.09.2012, 03:22
Re: Enter/exit problem - by Boooth - 14.09.2012, 03:42
Re: Enter/exit problem - by Devilxz97 - 14.09.2012, 03:54
Re: Enter/exit problem - by mamorunl - 14.09.2012, 09:20

Forum Jump:


Users browsing this thread: 1 Guest(s)