Bus Route - 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: Bus Route (
/showthread.php?tid=207094)
Bus Route -
wilko1995 - 05.01.2011
pawn Код:
dcmd_work(playerid, params[])
{
#pragma unused params
new broute;
new veh = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(veh == bus[1] || veh == bus[2] || veh == bus[3] || veh == bus[4] || veh == bus[5] || veh == bus[6] || veh == bus[7] || veh == bus[8] || veh == bus[9])
{
if(gTeam[playerid]==BDriver)
{
if(broute == 0)
{
broute = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "You have started a bus route go to the first checkpoint");
return 1;
}
else if(broute == 1)
{
broute = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "You have cancelled your bus route, you do not get paid");
return 1;
}
}
else return SendClientMessage(playerid, 0xFF0000AA, "You need to be a bus driver");
}
else return SendClientMessage(playerid, 0xFF0000AA, "You need to be in a bus");
}
return 1;
}
public SetRaceCheckpoint(playerid,target,next)
{
if(broute == 1)
{
SetPlayerRaceCheckpoint(playerid,0,1483.3484,-1874.7684,13.5751,1767.5543,-2169.5342,13.5753,3);
}
else if(broute == 1)
{
SetPlayerRaceCheckpoint(playerid,0,1767.5543,-2169.5342,13.5753,1825.2213,-2104.1260,13.5749,3);
}
}
This code doesnt put any race checkpoints anywhere. I need help please?
Re: Bus Route -
Nero_3D - 05.01.2011
I dont see that SetRaceCheckpoint gets called
And you check twice for the same in that function
Re: Bus Route -
wilko1995 - 05.01.2011
can u please show me where to call SetRaceCheckpoint? i need to see my mistake in order to learn from it...
Re: Bus Route -
TehEbil - 05.01.2011
I think it should be after "You have started ... ".
Re: Bus Route -
wilko1995 - 05.01.2011
So after that do I type SetRaceCheckpoint?
Re: Bus Route -
_rAped - 05.01.2011
Quote:
Originally Posted by wilko1995
So after that do I type SetRaceCheckpoint?
|
Yes.
... also place DisablePlayerRaceCheckpoint() when canceling the busroute.
Re: Bus Route -
wilko1995 - 05.01.2011
Ok thx for the help guys and gals. =D
Re: Bus Route -
wilko1995 - 06.01.2011
ok now the Checkpoints work but the bus route doesnt work with more then one player, ie when someone has stopped at the stop for the timer length ith say a message but its only meant to say the message to the bus driver not every player. also any other player that isnt me gets stuck on the first checkpoint, and if i am on another checkpoint and another player goes to the first checkpoint, it sets my route to skip one stop, please help.
Code:
http://pastebin.com/jMQ9H4fr
Wilko