10.12.2012, 14:59
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;
}