respawned with occupied vehicle?
#6

Quote:
Originally Posted by Mugala
Посмотреть сообщение
otherwise it could work.

PHP код:
stock IsVehicleOccupied(vehicleid)
{
    new 
state 0;
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerInVehicle(ivehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            
state 1;
        }
    }
    return 
state;

use this and you can also remove GetPlayerState (to use this for passengers too)
you don't had a correct return value.
why do you use
PHP код:
stock 
,and not simply
PHP код:
IsVehicleOccupied(vehicleid
Reply


Messages In This Thread
respawned with occupied vehicle? - by Dirda - 15.02.2018, 09:46
Re: respawned with occupied vehicle? - by PepsiCola23 - 15.02.2018, 10:39
Re: respawned with occupied vehicle? - by Eoussama - 15.02.2018, 10:44
Re: respawned with occupied vehicle? - by Mugala - 15.02.2018, 10:54
Re: respawned with occupied vehicle? - by Dirda - 16.02.2018, 04:29
Re: respawned with occupied vehicle? - by PepsiCola23 - 16.02.2018, 08:58
Re: respawned with occupied vehicle? - by RogueDrifter - 16.02.2018, 09:13
Re: respawned with occupied vehicle? - by MEW273 - 16.02.2018, 09:40
Re: respawned with occupied vehicle? - by RogueDrifter - 16.02.2018, 09:51
Re: respawned with occupied vehicle? - by Astralis - 16.02.2018, 09:56

Forum Jump:


Users browsing this thread: 1 Guest(s)