SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 07/08/2009, 08:05 PM   #1
Alice[WS]
Big Clucker
 
Join Date: Aug 2009
Posts: 59
Reputation: 3
Default Issue about /enter & /exit commands at an "i" icon

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
Alice[WS] is offline  
Old 07/08/2009, 08:18 PM   #2
narutogeek11
Big Clucker
 
Join Date: Feb 2009
Posts: 66
Reputation: 0
Default Re: Issue about /enter & /exit commands at an "i" icon

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;
}
narutogeek11 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Press "enter" to /enter a building. .:*Starstrike*:. Help Archive 8 02/08/2010 01:24 AM
MYSQL Issue - Callback "hanging" NeRoSiS Help Archive 0 28/02/2010 06:51 PM
Admin script requires "ReturnUser", "strtok" and "IsNumeric" Rubennnnn Help Archive 1 02/12/2009 06:08 PM
"Bots", "AI", "NPCs"... Computer-controlled pedestrians and traffic! ssflsnoob General 2 23/11/2008 06:06 PM


All times are GMT. The time now is 01:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.