PDA

View Full Version : Problem ,i need some help +1rep


jimis
01/06/2012, 07:42 AM
Hi guys,i have make a command for exit from cityhall but when player exit from cityhall ,the map cant load.And the player see this: http://imageshack.us/f/546/samp102xb.png/
Please guys i need some help.
Here is the command for exit from cityhall:
if (strcmp("/ExitCH", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 387.4368,173.7441,1008.3828))
{
SetPlayerPos(playerid, 2446.9475,2376.2249,12.1635);

}
else
SendClientMessage(playerid,COLOR_RED ,"[ERROR]You are not at door of cityhall");

}

Thanks for helping,
jimis

JaKe Elite
01/06/2012, 07:47 AM
if (strcmp("/ExitCH", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 387.4368,173.7441,1008.3828))
{
SetPlayerInteror(playerid, 0);
SetPlayerPos(playerid, 2446.9475,2376.2249,12.1635);
}
else
{
SendClientMessage(playerid,COLOR_RED ,"[ERROR]You are not at door of cityhall");
}
return 1;
}

pasha97
01/06/2012, 07:49 AM
Your script is missing setplayerinterior. Use:

if (strcmp("/ExitCH", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 387.4368,173.7441,1008.3828))
{
SetPlayerPos(playerid, 2446.9475,2376.2249,12.1635);
SetPlayerInteror(playerid, 0);
}
else
{
SendClientMessage(playerid,COLOR_RED ,"[ERROR]You are not at door of cityhall");
}
return 1;
}

jimis
01/06/2012, 07:56 AM
Ok, thanks huys