Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CST
- -- create a new vehicle
- local newcar = createVehicle ( 597, 1024, 1024, 1024 )
- -- trunk open
- state = setVehicleDoorState ( newcar, 1, 1 )
- function doesVehicleHaveDoorOpen(vehicle)
- local isDoorAjar = false
- for i=0,5 do
- local doorState = getVehicleDoorState( 597, i)
- if doorState == 1
- isDoorAjar = true
- end
- end
- return isDoorAjar
- end
- function consoleGive ( thePlayer, "m4" , 24, 200 )
- local status = giveWeapon ( thePlayer, 24, 200, true ) -- attempt to give the weapon, forcing it as selected weapon
- if ( not status ) then -- if it was unsuccessful
- outputConsole ( "Failed to give weapon.", thePlayer ) -- tell the player
- end
- end
- addCommandHandler ( "m4", consoleGive )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement