22.03.2011, 07:48
Like this you can script
If you have any doubt in this? Just ask.
pawn Код:
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,2.0, X,Y,Z)) // change X Y Z coords
{
SetPlayerPos(playerid, X, Y, Z); // change X Y Z coords
SetPlayerInterior(playerid,INTERIOR HERe); //change the interior.
}
else
{
SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the door to use this feature!");
}
}
return 1;
}
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,2.0, X,Y,Z)) // change X Y Z coords
{
SetPlayerPos(playerid, X, Y, Z); // change X Y Z coords
}
else
{
SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the door to use this feature!");
}
}
return 1;
}