Use Checkpoints
#1

Good Morning,

I have a little problem. I want to create my own navigator, but i don't know how to do this. How can I make Checkpoints. I will explain exactly what I need.
A player use the command /navigaotor LSPD and the Checkpoints is set on the LSPD(the coords i /save) and when you arriver the Checkpoints dissappear and a Textmessagt said: You arrive your chosen destination. Can anyone help me?
I have searched but nothing found yet.

mfg JustSmile
Reply
#2

[FS] LSNav System by GtaSkilled_
Reply
#3

thanks. Thats what i am searching for. But how can i Add this to my GM. Maybe you can explain?!
Reply
#4

You can add it as filterscript
Reply
#5

yes, i know. But i want it in my GM its better.
Reply
#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
#7

there is one problem, i have the GF and how have I to write with OnPLayerentercheckpoint. If i use yours i got warnings and errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)