Quote:
Originally Posted by [DM]Kane
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.
|
Thank you very much,it works now!