[HELP] OMG !
#8

@Hot

Код:
#include <a_samp>

#define COLOR_LIGHTBLUE 0x33CCFFAA

#pragma tabsize 0

public OnPlayerSpawn(playerid)
{
	SetPlayerCheckpoint(playerid, 1874.2103, -1642.0880, 31.8047, 3.00);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/airport", cmdtext, true) == 0)
	{
		if(IsPlayerInCheckpoint(playerid))
		{
			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Teleported.");
		}
		else
		{
			SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are not in the checkpoint");
		}
		return 1;
	}
}

public OnPlayerEnterCheckpoint(playerid)
{
  if (IsPlayerInCheckpoint(playerid))
  {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /airport to teleport you to your airport");
  }
  return 1;
}
If you'd read the wiki before coming here and posting, you'd know that SetPlayerCheckpoint does not return a value.

The "else if" that you had in there was pointless, I've removed it.

IsPlayerInCheckpoint(playerid) == ACP is also useless, because IsPlayerInCheckpoint only returns true, or false.

It should work now.
Reply


Messages In This Thread
[HELP] OMG ! - by Hot - 01.03.2009, 19:02
Re: [HELP] OMG ! - by Hot - 01.03.2009, 19:15
Re: [HELP] OMG ! - by Nubotron - 01.03.2009, 19:17
Re: [HELP] OMG ! - by Hot - 01.03.2009, 19:18
Re: [HELP] OMG ! - by Serbish - 01.03.2009, 19:20
Re: [HELP] OMG ! - by Hot - 01.03.2009, 19:29
Re: [HELP] OMG ! - by member - 01.03.2009, 19:38
Re: [HELP] OMG ! - by 1337pr0 - 01.03.2009, 19:44

Forum Jump:


Users browsing this thread: 1 Guest(s)