Quote:
Originally Posted by Dayrion
It's better, no?
PHP код:
else if(pickupid == Pickups[motoex])
{
if(!IsPlayerInAnyVehicle(playerid)) SetPlayerPos(playerid, 2145.2996,-1177.1656,23.8203);
new
vehicle_id = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid,2145.2996,-1177.1656,23.8203);
PutPlayerInVehicle(playerid,vehicle_id,0);
}
|
Actually no, your code will run what's under if (!IsPlayerInAnyVehicle because you're not stopping it by returning something, while the code with if () else () don't run both if the first one is true.