| Blockland Forums > Modification Help |
| if vehicle driver (SOLVED) |
| (1/1) |
| Swollow:
how do I check if someone in a vehicle is in the driver seat of it? (even if they are not controlling the vehicle) --- Code: ---%Client.Player.isPilot --- End code --- will return if your in seat 0 or not |
| Slicksilver:
Well, you can check if they're in slot 0 which is the slot that controls vehicles. --- Code: ---%vehicle = %player.getMountObject(); if(%vehicle.getMountedObject(0) == %player) { //your stuff here } --- End code --- |
| Greek2me:
Pretty sure there's a .getDriver() method. |
| Swollow:
--- Code: --- for(%i=0;%i<%Client.Minigame.NumMembers;%i++) { %Target = %Client.Minigame.Member[%i]; if(isObject(%Target.Player)) { %Vehicle = %Target.Player.getObjectMount(); if(!isObject(%Vehicle)) return; if(%Vehicle.GetMountedObject(0) == %Target.Player) { %Target.Player.SetControlObject(%Vehicle); } } } --- End code --- This will still get everyone in the vehicle how would I fix this? and getDriver() is not a valid function |
| Navigation |
| Message Index |