05.01.2011, 10:09
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);
}
}