05.10.2011, 16:31
Hello there.
I am working on my own server and with help of a tutorial I made an /enter and /exit script.
/enter works perfectly. But /exit does absolutely nothing.
Here's the script:
Help would be appreciated since I'm stuck here!
I am working on my own server and with help of a tutorial I made an /enter and /exit script.
/enter works perfectly. But /exit does absolutely nothing.
Here's the script:
pawn Код:
if(strcmp("/enter", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,2.0, -217.7940,979.1616,19.5038)) // change X Y Z coords
{
SetPlayerPos(playerid, 246.783996,63.900199,1003.640625); // change X Y Z coords
SetPlayerInterior(playerid,6); //change the interior.
}
else
{
SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the entrance to enter!");
}
}
return 1;
}
if(strcmp("/exit", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,2.0, 246.783996,63.900199,1003.640625)) // change X Y Z coords
{
SetPlayerPos(playerid, -217.7940,979.1616,19.5038); // change X Y Z coords
}
else
{
SendClientMessage(playerid, 0x33CCFFAA, "You need to be near the entrance to exit!");
}
}
return 1;
}