respawned with occupied vehicle?
#5

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.
Код:
C:\Users\gratiotio\Desktop\MGP\gamemodes\a.pwn(67322) : error 001: expected token: "-identifier-", but found "state"
C:\Users\gratiotio\Desktop\MGP\gamemodes\a.pwn(67327) : error 001: expected token: "-identifier-", but found "="
C:\Users\gratiotio\Desktop\MGP\gamemodes\a.pwn(67327) : error 029: invalid expression, assumed zero
C:\Users\gratiotio\Desktop\MGP\gamemodes\a.pwn(67327) : warning 215: expression has no effect
C:\Users\gratiotio\Desktop\MGP\gamemodes\a.pwn(67330) : error 001: expected token: "-identifier-", but found ";"
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)