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);
}
|
This is the same, you just swapped the position with the negative statement using ! operator and removing some brackets. This works the same anyway. People finds it better just because it reduces some lines from your code, "the less code lines the more better code" is just a theory.