14.09.2012, 09:20
Quote:
|
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. |
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;
}
}


