A few basic errors.
#1

I have a few errors, which I believe will be simple enough to fix.

pawn Код:
if(!strcmp(cmdtext, "/enter", true))
        {
            if(IsPlayerInRangeOfPoint(playerid, 10, 1341.5411, -1675.3422, 17.7164))
        {
            SetPlayerPos(playerid, 963.70001221, -53.29999924, 1000.70001221);
            SetPlayerInterior(playerid, 3);
        }
            return 1;
        }

    if(!strcmp(cmdtext, "/exit", true))
        {
            if(IsPlayerInRangeOfPoint(playerid, 10, 963.70001221, -53.29999924, 1000.70001221))
        {
            SetPlayerPos(playerid, 1341.5411, -1675.3422, 17.7164);
            SetPlayerInterior(playerid, 0);
        }
            return 1;
        }
The /enter command works perfectly, but upon typing /exit nothing happens, why is this?


also

pawn Код:
Create3DTextLabel("Please press /enter", 0xEF994300, 1341.5411, -1675.3422, 17.7164, 10, 0, 1);
    Create3DTextLabel("Please press /exit", 0xEF994300, 963.70001221, -53.29999924, 1000.70001221, 10, 0, 1);
Why aren't these showing up in my server?

Thank you.
Reply
#2

Could be you are not near the coords you provided, try this to see if you get the message saying you are not near the exit point:

Код:
if(!strcmp(cmdtext, "/enter", true))        {            

	if(IsPlayerInRangeOfPoint(playerid, 10, 1341.5411, -1675.3422, 17.7164)) {            
		SetPlayerPos(playerid, 963.70001221, -53.29999924, 1000.70001221);            
		SetPlayerInterior(playerid, 3);        
	}            
	else  SendClientMessage(playerid, COLOR_GREEN, "You are not near any enter points");
	
return 1;        
}    


if(!strcmp(cmdtext, "/exit", true))        {            
	if(IsPlayerInRangeOfPoint(playerid, 10, 963.70001221, -53.29999924, 1000.70001221)) {
            SetPlayerPos(playerid, 1341.5411, -1675.3422, 17.7164);            
	    SetPlayerInterior(playerid, 0);        
	}            
	else  SendClientMessage(playerid, COLOR_GREEN, "You are not near any exit points");

return 1;        
}
Regarding the 3d textdraws it could also be that the coords are wrong, i cant tell from what you posted.
Reply
#3

I got the /exit working, turns out a filterscript was interfering with it.

Still clueless as to why the labels aren't working.
Reply
#4

Okay, update on the text labels.

I now have

pawn Код:
new Text3D:Enter;
new Text3D:Exit;
pawn Код:
Enter = Create3DTextLabel("Please press /enter", 0xEF994300, 1341.5411, -1675.3422, 17.7164, 10, -1, 0);
    Exit = Create3DTextLabel("Please press /exit", 0xEF994300, 963.70001221, -53.29999924, 1000.70001221, 10, -1, 0);
    Update3DTextLabelText(Text3D:Enter, 0xEF994300, "Please press /enter");
    Update3DTextLabelText(Text3D:Exit, 0xEF994300, "Please press /exit");
but it still doesn't show up, why?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)