Issue about /enter & /exit commands at an "i" icon -
Alice[WS] - 07.08.2009
Well, i tryed to add some "i" icons at my server. It has worked good when there were only 1 "i", but with the 2nd, i type /enter at the icon and nothing comes (it don't show any error while i compile).
Code:
Enter = CreatePickup(1239, 1, 1727.0585,-1637.0344,20.2174);
Enter = CreatePickup(1239, 1, 1836.0000,-1684.0000,13.3663);
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true) == 0) //----- /enter а la banque
{
if (PlayerToPoint(3.0, playerid, 1727.0585,-1637.0344,20.2174))
{
SetPlayerInterior(playerid,18);
SetPlayerPos(playerid, 1727.1586,-1638.4100,20.2232);
return 1;
}
return 1;
}
if (strcmp("/exit", cmdtext, true) == 0) //----- /exit а la banque
{
if (PlayerToPoint(3.0, playerid, 1727.1586,-1638.4100,20.2232))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1727.0585,-1637.0344,20.2174);
return 1;
}
return 1;
}
if (strcmp("/enter", cmdtext, true) == 0) //----- /enter а l'alhambra
{
if (PlayerToPoint(3.0, playerid, 1836.0000,-1684.0000,13.3663))
{
SetPlayerInterior(playerid,17);
SetPlayerPos(playerid, 493.0000,-23.0000,1000.6797);
return 1;
}
return 1;
}
if (strcmp("/exit", cmdtext, true) == 0) //----- /exit а l'alhambra
{
if (PlayerToPoint(3.0, playerid, 493.5450,-23.6031,1000.6797))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1836.0000,-1684.0000,13.3663);
return 1;
}
return 1;
}
return 0;
}
If someone knows how to fix it ...
Thanks
Re: Issue about /enter & /exit commands at an "i" icon -
narutogeek11 - 07.08.2009
Dude instead of using two /enter commands put them together like
pawn Code:
ublic OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true) == 0) //----- /enter а la banque
{
if (PlayerToPoint(3.0, playerid, 1727.0585,-1637.0344,20.2174))
{
SetPlayerInterior(playerid,18);
SetPlayerPos(playerid, 1727.1586,-1638.4100,20.2232);
return 1;
} else {
if (PlayerToPoint(3.0, playerid, 1836.0000,-1684.0000,13.3663))
{
SetPlayerInterior(playerid,17);
SetPlayerPos(playerid, 493.0000,-23.0000,1000.6797);
}
return 1;
}
if (strcmp("/exit", cmdtext, true) == 0) //----- /exit а la banque
{
if (PlayerToPoint(3.0, playerid, 1727.1586,-1638.4100,20.2232))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1727.0585,-1637.0344,20.2174);
} else {
if (PlayerToPoint(3.0, playerid, 493.5450,-23.6031,1000.6797))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1836.0000,-1684.0000,13.3663);
}
return 1;
}
return 1;
}
if (strcmp("/enter", cmdtext, true) == 0) //----- /enter а l'alhambra
{
if (PlayerToPoint(3.0, playerid, 1836.0000,-1684.0000,13.3663))
{
SetPlayerInterior(playerid,17);
SetPlayerPos(playerid, 493.0000,-23.0000,1000.6797);
return 1;
}
return 1;
}
if (strcmp("/exit", cmdtext, true) == 0) //----- /exit а l'alhambra
{
if (PlayerToPoint(3.0, playerid, 493.5450,-23.6031,1000.6797))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1836.0000,-1684.0000,13.3663);
return 1;
}
return 1;
}
return 0;
}