27.01.2014, 22:40
How can I make button " T " enter to buildings with /enter and /exit ??
enter:
and exit??:
enter:
Код:
CMD:enter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1368.8760,-1279.8350,13.5469))
{
SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625); //ammu1
SetPlayerInterior(playerid, 1);
}
if(IsPlayerInRangeOfPoint(playerid, 5, 1833.7809,-1842.6556,13.5781))
{
SetPlayerPos(playerid, -26.691598,-55.714897,1003.546875); //shop1
SetPlayerInterior(playerid, 6);
}
if(IsPlayerInRangeOfPoint(playerid, 5, 1154.7290,-1457.8655,15.7969))
{
SetPlayerPos(playerid, 6.091179,-29.271898,1003.549438); //shop2
SetPlayerInterior(playerid, 10);
}
return 1;
}
Код:
CMD:exit(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 286.148986,-40.644397,1001.515625))
{
SetPlayerPos(playerid, 1368.8760,-1279.8350,13.5469);//ammu1
SetPlayerInterior(playerid, 0);
}
if (IsPlayerInRangeOfPoint(playerid, 5,-26.691598,-55.714897,1003.546875))
{
SetPlayerPos(playerid, 1833.7809,-1842.6556,13.5781); //shop1
SetPlayerInterior(playerid, 0);
}
if (IsPlayerInRangeOfPoint(playerid, 5,6.091179,-29.271898,1003.549438))
{
SetPlayerPos(playerid, 1154.7290,-1457.8655,15.7969); //shop2
SetPlayerInterior(playerid, 0);
}
return 1;
}


it work well expect it gave me warnings but nevermind