pickupe teleport
#9

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
It's better, no?
PHP код:
else if(pickupid == Pickups[motoex]) 

    if(!
IsPlayerInAnyVehicle(playerid)) SetPlayerPos(playerid2145.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.
Reply


Messages In This Thread
pickupe teleport - by hillko - 06.07.2016, 07:23
Re: pickupe teleport - by Mencent - 06.07.2016, 07:25
Re: pickupe teleport - by hillko - 06.07.2016, 08:39
Re: pickupe teleport - by Mencent - 06.07.2016, 08:40
Re: pickupe teleport - by Dayrion - 06.07.2016, 09:52
Re: pickupe teleport - by hillko - 06.07.2016, 12:36
Re: pickupe teleport - by Mencent - 06.07.2016, 13:02
Re: pickupe teleport - by Dayrion - 06.07.2016, 13:14
Re: pickupe teleport - by Sjn - 06.07.2016, 13:20
Re: pickupe teleport - by Stinged - 06.07.2016, 14:18

Forum Jump:


Users browsing this thread: 1 Guest(s)