pickupe teleport
#10

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);

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.
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)