08.02.2010, 19:28
Just check if a player is near the pickup while they use the /enter command. E.g.
Requires PlayerToPoint function
Requires PlayerToPoint function
pawn Код:
if(strcmp(cmdtext, "/enter", true) == 0)
{
if(PlayerToPoint(5, playerid, xx.xx, xx.xx, xx.xx)) // Replace "xx.xx" with the coordinates for the pickup
{
SetPlayerInterior(playerid, x); // Replace "x" with teh interior ID.
SetPlayerPos(playerid, xx.xx, xx.xx, xx.xx); // Place "xx.xx" with the coordinates for the tele'd location
SetPlayerFacingAngle(playerid, xx.xx); // Place "xx.xx" with the facing angle for when they are tele'd
return 1;
}
return 1;
}