Checkpoint streamer problem
#1

I'm using Dragstas checkpoint streamer...

http://forum.sa-mp.com/index.php?topic=69459.0

I've added one checkpoint so far, and it works great!..

The problem i'm having is...I would like to add a new checkpoint, and i know how to everything like except when you get to
Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
I'm not sure how to add a new checkpoint into that public, heres what i have so far

Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
  if(streamid == cp1)
  {
    GameTextForPlayer(playerid,"Welcome to the Hospital! Type /heal to restore your HP! It costs $100",3000,5);
  }
  return 1;
}
I want to add a new "Streamid" called cp2 (i've already done everything for it like add it's position and type new cp2; but i don't know how to add it into that public function....can someone help
Reply
#2

Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
  if(streamid == cp1)
  {
    GameTextForPlayer(playerid,"Welcome to the Hospital! Type /heal to restore your HP! It costs $100",3000,5);
  }
  else if(streamid == cp2)
  {
    stuff here....
  }
  return 1;
}
or you could use switch:

Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
  switch(streamid)
  {
    case cp1: GameTextForPlayer(playerid,"Welcome to the Hospital! Type /heal to restore your HP! It costs $100",3000,5);
    case cp2: stuff here....
  }
  return 1;
}
Reply
#3

Quote:
Originally Posted by killdahobo99
I'm using Dragstas checkpoint streamer...

http://forum.sa-mp.com/index.php?topic=69459.0

I've added one checkpoint so far, and it works great!..

The problem i'm having is...I would like to add a new checkpoint, and i know how to everything like except when you get to
Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
I'm not sure how to add a new checkpoint into that public, heres what i have so far

Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
  if(streamid == cp1)
  {
    GameTextForPlayer(playerid,"Welcome to the Hospital! Type /heal to restore your HP! It costs $100",3000,5);
  }
  return 1;
}
I want to add a new "Streamid" called cp2 (i've already done everything for it like add it's position and type new cp2; but i don't know how to add it into that public function....can someone help
cp2 = Checkpoint

else if(streamid == cp2)
{

}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)