Please help me with this
#9

You weren't online, so i decided to tell it here.

So, you can create checkpoints without a streamer, but then, you can't use smoothly more than one checkpoint.
But if you need only 1 checkpoint, you can create it like this:

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 321.0736, 1121.1912, 1083.8828, 3);
    return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    SendClientMessage(playerid, 0xFFFFFFFF, "You entered Checkpoint");
    return 1;
}

But, if you want to use more than just one checkpoint, i suggest you to get some checkpoint streamer.
I personally like CPS, but you can use any streamer you want.

Instructions for CPS:
Download



How do I use it?
It is very simple:
1. Download the .inc file from one of the links below
2. Put the .inc file in your 'includes' directory.
3. Include it into your GM/FS with '#include <cps>'
4. Make the following additions to your script:
1. Add 'StartSystem();' to OnGameModeInit/OnFilterScriptInit.
2. Add 'ClearVars(playerid);' to OnPlayerConnect.
3. Add 'SyncCheckpoints(playerid);' to OnPlayerConnect.
4. Add 'CheckpointCheck(playerid);' to the TOP of OnPlayerEnterCheckpoint.
5. Add the following callback to your script:
pawn Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
  return 1;
}
5. You can now use the following functions:
pawn Код:
CreateCheckpoint(playerid, Float:cpX, Float:cpY, Float:cpZ, Float:cpS, Float:viewdiss); //Will create a streamed checkpoint for the specified player. Use -1 as playerid for all players
DestroyCheckpoint(cPid); //Destroys a checkpoint.
TogglePlayerCheckpoint(playerid, cpid, bool:toggle); //Toggles a checkpoint on/off for a player.


So if you decided yo use CPS, i'll give you one example how to create some checkpoints and use the checkpoints.

Before Main:
pawn Код:
new CP1;
new CP2;
new CP3;
new CP4;
new CP5;
new CP6;
new CP7;
pawn Код:
public OnPlayerConnect(playerid)
{
  ClearVars(playerid);
  SyncCheckpoints(playerid);
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    CP1 = CreateCheckpoint(playerid, 2526.6646,-1733.3737,13.1100, 5, 20);
    CP2 = CreateCheckpoint(playerid, 2492.4700,-1731.9531,13.1100, 5, 40);
    CP3 = CreateCheckpoint(playerid, 2435.5293,-1731.1017,13.3086, 5, 40);
    CP4 = CreateCheckpoint(playerid, 2372.0400,-1730.5052,13.1101, 5, 40);
    CP5 = CreateCheckpoint(playerid, 2302.9905,-1730.4089,13.1101, 5, 40);
    CP6 = CreateCheckpoint(playerid, 2253.2922,-1730.3390,13.1100, 5, 40);
    CP7 = CreateCheckpoint(playerid, 2213.5447,-1730.2816,13.1307, 5, 40);
   
    TogglePlayerCheckpoint(playerid, CP1, true);
    TogglePlayerCheckpoint(playerid, CP2, true);
    TogglePlayerCheckpoint(playerid, CP3, true);
    TogglePlayerCheckpoint(playerid, CP4, true);
    TogglePlayerCheckpoint(playerid, CP5, true);
    TogglePlayerCheckpoint(playerid, CP6, true);
    TogglePlayerCheckpoint(playerid, CP7, true);

    return 1;
}
pawn Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
    if(streamid == CP1) return SendClientMessage(playerid, 0xFFFFFFFF, "CP1");
    if(streamid == CP2) return SendClientMessage(playerid, 0xFFFFFFFF, "CP2");
    if(streamid == CP3) return SendClientMessage(playerid, 0xFFFFFFFF, "CP3");
    if(streamid == CP4) return SendClientMessage(playerid, 0xFFFFFFFF, "CP4");
    if(streamid == CP5) return SendClientMessage(playerid, 0xFFFFFFFF, "CP5");
    if(streamid == CP6) return SendClientMessage(playerid, 0xFFFFFFFF, "CP6");
    if(streamid == CP7) return SendClientMessage(playerid, 0xFFFFFFFF, "CP7");

  return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  CheckpointCheck(playerid);
return 1;
}

I hope this helps you Killdahobo.

Reply


Messages In This Thread
Please help me with this - by killdahobo99 - 08.01.2010, 21:32
Re: Problem with my checkpoint - by killdahobo99 - 09.01.2010, 01:02
Re: Problem with my checkpoint - by Lajko1 - 09.01.2010, 07:03
Re: Problem with my checkpoint - by killdahobo99 - 09.01.2010, 12:41
Re: Please help me with this - by killdahobo99 - 09.01.2010, 16:47
Re: Please help me with this - by killdahobo99 - 10.01.2010, 19:52
Re: Please help me with this - by lameguy - 10.01.2010, 19:59
Re: Please help me with this - by killdahobo99 - 11.01.2010, 01:45
Re: Please help me with this - by lameguy - 11.01.2010, 13:49
Re: Please help me with this - by killdahobo99 - 11.01.2010, 19:59

Forum Jump:


Users browsing this thread: 1 Guest(s)