Use Checkpoints
#6

Bah...
Ok.
Add this under #include <a_samp>:
pawn Код:
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLACK 0x000000FF
Add this in end of script:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  DisablePlayerCheckpoint(playerid);
  GameTextForPlayer(playerid, "~w~You have~n~~y~arrived", 5000, 1);
  return 1;
}
Add this in OnPlayerCommandText:
pawn Код:
if(strcmp(cmdtext, "/navhelp", true) == 0)
  {
    SendClientMessage(playerid, COLOR_BLACK, "___________________LSNav Help________________________");
    SendClientMessage(playerid, COLOR_YELLOW, "LSNav - /pd /hospital /airport /pier /grove");
    SendClientMessage(playerid, COLOR_YELLOW, "LSNav - /clear /gym /tower");
    return 1;
  }
  if(strcmp(cmdtext, "/pd", true) == 0)
  {
     SetPlayerCheckpoint(playerid,1529.6,-1691.2,13.3,4.0);
    GameTextForPlayer(playerid, "~w~Nav SYS set ~g~Los Santos PD", 5000, 1);
    return 1;
  }
  if(strcmp(cmdtext, "/hospital", true) == 0)
  {
    SetPlayerCheckpoint(playerid,2029.5945,-1404.6426,17.2512,4.0);
    GameTextForPlayer(playerid, "~w~Nav SYS set ~g~Hospital", 5000, 1);
    return 1;
  }
  if(strcmp(cmdtext, "/airport", true) == 0)
  {
    SetPlayerCheckpoint(playerid,1963.7876,-2195.5500,13.5469,4.0);
    GameTextForPlayer(playerid, "~w~Nav SYS set ~g~LS Airport", 5000, 1);
    return 1;
  }
  if(strcmp(cmdtext, "/pier", true) == 0)
  {
    SetPlayerCheckpoint(playerid,839.5338,-2057.8774,12.8672,4.0);
    GameTextForPlayer(playerid, "~w~Nav SYS set ~g~LS pier", 5000, 1);
    return 1;
  }
  if(strcmp(cmdtext, "/grove", true) == 0)
  {
    SetPlayerCheckpoint(playerid,2492.6826,-1674.1060,13.3359,4.0);
    GameTextForPlayer(playerid, "~w~Nav SYS set ~g~Grove Street", 5000, 1);
    return 1;
  }
  if(strcmp(cmdtext, "/clear", true) == 0)
  {
    DisablePlayerCheckpoint(playerid);
    GameTextForPlayer(playerid, "~w~Nav SYS ~g~Cleared", 5000, 1);
    return 1;
  }
  if(strcmp(cmdtext, "/gym", true) == 0)
  {
    SetPlayerCheckpoint(playerid,2267.8606,-1723.5905,13.5469,4.0);
    GameTextForPlayer(playerid, "~w~Nav SYS set ~r~Gym", 5000, 1);
    return 1;
  }
  if(strcmp(cmdtext, "/tower", true) == 0)
  {
    SetPlayerCheckpoint(playerid,1558.4553,-1349.3193,329.4609,4.0);
    GameTextForPlayer(playerid, "~w~Nav SYS set ~r~LS tower", 5000, 1);
    return 1;
  }
Done.
Reply


Messages In This Thread
Use Checkpoints - by Justsmile - 04.03.2009, 07:02
Re: Use Checkpoints - by Magician - 04.03.2009, 07:54
Re: Use Checkpoints - by Justsmile - 04.03.2009, 08:12
Re: Use Checkpoints - by Magician - 04.03.2009, 09:30
Re: Use Checkpoints - by Justsmile - 04.03.2009, 09:43
Re: Use Checkpoints - by Magician - 04.03.2009, 11:19
Re: Use Checkpoints - by Justsmile - 04.03.2009, 11:41

Forum Jump:


Users browsing this thread: 1 Guest(s)