Function won't work
#4

pawn Код:
stock GetPlayerBusLine(playerid,line) {
new line;
new PlayerState = GetPlayerState(playerid);
if(playerState == PLAYER_STATE_PASSENGER) {
if(GetPlayerVehicleID(playerid) == Buses[0] || GetPlayerVehicleID(playerid) == Buses[1]) return line = 1;
if(GetPlayerVehicleID(playerid) == Buses[2] || GetPlayerVehicleID(playerid) == Buses[3]) return line = 2;
if(GetPlayerVehicleID(playerid) == Buses[4] || GetPlayerVehicleID(playerid) == Buses[5]) return line = 3;
if(GetPlayerVehicleID(playerid) == Buses[6] || GetPlayerVehicleID(playerid) == Buses[7]) return line = 4;
if(GetPlayerVehicleID(playerid) == Buses[8] || GetPlayerVehicleID(playerid) == Buses[9]) return line = 5;
if(GetPlayerVehicleID(playerid) == Buses[10] || GetPlayerVehicleID(playerid) == Buses[11]) return line = 6;
if(GetPlayerVehicleID(playerid) == Buses[12] || GetPlayerVehicleID(playerid) == Buses[13]) return line = 7;
if(GetPlayerVehicleID(playerid) == Buses[14] || GetPlayerVehicleID(playerid) == Buses[15]) return line = 8;
if(GetPlayerVehicleID(playerid) == Buses[16] || GetPlayerVehicleID(playerid) == Buses[17]) return line = 9;
if(GetPlayerVehicleID(playerid) == Buses[18] || GetPlayerVehicleID(playerid) == Buses[19]) return line = 10;
}
return 1;
}
"==" is used to check whether the two are equal or not, whereas, "=" sets the value of thing on left as the thing on right.
Reply


Messages In This Thread
Function won't work - by nuriel8833 - 03.05.2011, 12:51
Re: Function won't work - by Calgon - 03.05.2011, 13:52
Re: Function won't work - by nuriel8833 - 03.05.2011, 13:54
Re: Function won't work - by [DM]Kane - 03.05.2011, 13:58
Re: Function won't work - by nuriel8833 - 03.05.2011, 14:00
Re: Function won't work - by [DM]Kane - 03.05.2011, 14:14

Forum Jump:


Users browsing this thread: 1 Guest(s)