13.09.2012, 15:18
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/enter", true)){
if(IsPlayerInRangeOfPoint(playerid, 13.0, x,y,z)){//the place that you want the player be to /enter
SetPlayerInterior(playerid,interiorid);//get the interior http://weedarr.wikidot.com/interiornl67f...8.20803870
SetPlayerPos(playerid,y,x,z);//interior pos http://weedarr.wikidot.com/interiornl67f...8.20803870
GameTextForPlayer(playerid,"Welcome to the Interior!",4000,6);//change interior to anything else
return 1;
}
}
if(!strcmp(cmdtext, "/exit", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, x,y,z)){//the place you want the player type /enter from
SetPlayerInterior(playerid,0);//always 0
SetPlayerPos(playerid,x,y,z);//the original place that he typed /enter from
GameTextForPlayer(playerid,"you left the interior !",4000,6);
return 1;
}
}
return 0;
}
