Need help with /enter and /exit
#1

I have a /enter and /exit command I get the /enter to work but the /exit wont I also want it to display text when on or near the pickup how?
Код HTML:
    if(!strcmp(cmdtext, "/enter", true))
    {
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 1929.3467,-1776.0195,13.5469))
    	{
    SetPlayerPos(playerid,-30.946699,-89.609596,1003.549988);//Idlegas entrance
    SetPlayerInterior(playerid, 18);
        }
    }
    if(!strcmp(cmdtext, "/exit", true))
    {
    if(IsPlayerInRangeOfPoint(playerid, 3.0, -30.9595,-91.7379,1003.5469))
    	{
    SetPlayerPos(playerid,1929.3467,-1776.0195,13.5469);//Idlegas Exit
}
	}
    return 0;
 }
Reply
#2

I think the reason the /exit command doesn't work is because you're not in range of the coordinates in the IsPlayerInRangeOfPoint function..
Try to resave the coords, adding them into the command again and increasing the range a little.
For text above the pickup, use Create3DTextLabel, or CreateDynamic3DTextLabel if you use a streamer.
And next time, you can put pawn code between pawn tags > [pawn]
Reply
#3

That doesn't make sense because my IsPlayerInRangeOfPoint is set to the exact cord of the pickup
Код:
  AddStaticPickup(1239, 1,1929.3467,-1776.0195,13.5469,-1);//Idlegas entrance
	AddStaticPickup(1239,1,-30.9595,-91.7379,1003.5469);//Idlegas Exit
Reply
#4

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)