TheMtaUser555 Posted August 21, 2011 Share Posted August 21, 2011 SO here's the code policeVehicles = { [416]=true, [433]=true, [427]=true, [490]=true, [528]=true, [407]=true, [544]=true, [523]=true, [470]=true, [598]=true, [596]=true, [597]=true, [599]=true, [432]=true, [601]=true, [428]=true, [497]=true} function enterVehicle ( theVehicle, seat, jacked ) if ( not policeVehicles[getElementModel(source)] ) then blip = createBlipAttachedTo ( source, 55, 1 ) setBlipOrdering(blip, getBlipOrdering(blip) + 5) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle ) Now the problem. it worked well with the older version of Race resource (https://community.multitheftauto.com/index.php?p=resources&s=details&id=35) but now for some reason it won't work with the latest one (the one included with the mta 1.0.5) When the Race starts, the player that doesn't have a cop car doesn't have a blip attached to him..And like I said before, it worked with the older version. I tried to use the funtion onPlayerSpawn, but it only worked when the player respawned.. I guess the new version doesn't "spawn" the player inside the vehicle? instead it teleports him inside the car? I'm confused..Please help and thanks! Link to comment
Castillo Posted August 21, 2011 Share Posted August 21, 2011 policeVehicles = { [416]=true, [433]=true, [427]=true, [490]=true, [528]=true, [407]=true, [544]=true, [523]=true, [470]=true, [598]=true, [596]=true, [597]=true, [599]=true, [432]=true, [601]=true, [428]=true, [497]=true} function enterVehicle ( theVehicle, seat, jacked ) if ( not policeVehicles[getElementModel(theVehicle)] ) then blip = createBlipAttachedTo ( source, 55, 1 ) setBlipOrdering(blip, getBlipOrdering(blip) + 5) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle ) 'source' of onPlayerVehicleEnter is the player who entered the vehicle, you we're getting the model of the player, not of vehicle. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now