Checkpoint streamer problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checkpoint streamer problem (
/showthread.php?tid=85702)
Checkpoint streamer problem - killdahobo99 - 09.07.2009
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
Re: Checkpoint streamer problem -
StrickenKid - 09.07.2009
Код:
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;
}
Re: Checkpoint streamer problem -
Chaprnks - 09.07.2009
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)
{
}