Car problem.
#5

You can't remove players from vehicles under OnPlayerEnterVehicle, you need to use OnPlayerStateChange like this
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)) // Player entered a vehicle
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(vehicleid == 412)
        {
            new name[MAX_PLAYER_NAME+1];
            GetPlayerName(playerid, name,sizeof(name));
            if(strfind(name,"[GS]",false) != -1)
            {
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREEN,"SERVER: You are not a official Grove Street Member!");
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Car problem. - by Lynet - 10.12.2012, 13:34
Re: Car problem. - by dr.lozer - 10.12.2012, 13:39
Re: Car problem. - by Lynet - 10.12.2012, 13:48
Re: Car problem. - by dr.lozer - 10.12.2012, 14:58
Re: Car problem. - by you10 - 10.12.2012, 14:59
Re: Car problem. - by Lynet - 11.12.2012, 05:46
Respuesta: Car problem. - by deb014 - 11.12.2012, 06:01
Re: Respuesta: Car problem. - by Konstantinos - 11.12.2012, 09:23
Re: Car problem. - by Jarnu - 11.12.2012, 09:28
Respuesta: Re: Respuesta: Car problem. - by deb014 - 11.12.2012, 13:06

Forum Jump:


Users browsing this thread: 1 Guest(s)