public static int Clone() { int ped = PLAYER.PLAYER_PED_ID(); int pedCloned = PED.CLONE_PED(ped, 1f, false, true); MakeHimAsGuard(pedCloned); return(pedCloned); }
public PED get_phase_envelope_data() { PED ret = new PED(CoolPropPINVOKE.AbstractState_get_phase_envelope_data(swigCPtr), false); if (CoolPropPINVOKE.SWIGPendingException.Pending) { throw CoolPropPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static void RagDoll(bool toggle) { int ped = PLAYER.PLAYER_PED_ID(); PED.SET_PED_CAN_RAGDOLL(ped, !toggle); PED.SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(ped, !toggle); ENTITY.SET_ENTITY_INVINCIBLE(ped, toggle); PED.SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(ped, 1); PLAYER.GIVE_PLAYER_RAGDOLL_CONTROL(ped, !toggle); PED.SET_PED_RAGDOLL_ON_COLLISION(ped, !toggle); }
public static void MakeHimAsGuard(int ped) { int groupId = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()); int leader = PLAYER.PLAYER_PED_ID(); PED.SET_PED_AS_GROUP_LEADER(leader, groupId); PED.SET_PED_AS_GROUP_MEMBER(ped, groupId); PED.SET_PED_NEVER_LEAVES_GROUP(ped, true); PED.SET_PED_CAN_SWITCH_WEAPON(ped, true); PED.SET_PED_COMBAT_ABILITY(ped, 1); }
public static void TeleportToWaypoint() { Vector3 wp = WayPoint(); if (wp.X == 0) { return; } GAMEPLAY.GET_GROUND_Z_FOR_3D_COORD(wp.X, wp.Y, 5000.0f, RPC.FreePointer, true); float z = PS4.Extension.ReadFloat(RPC.FreePointer); int ped = PLAYER.PLAYER_PED_ID(); int veh = PED.GET_VEHICLE_PED_IS_IN(ped, false); ENTITY.SET_ENTITY_COORDS(veh == 0 ? ped : veh, wp.X, wp.Y, z, true, true, true, true); }
public static int SpawnVehicle(string vehName, bool intoVehicle = true) { int vehHash = GAMEPLAY.GET_HASH_KEY(vehName); int newVec = 0; STREAMING.REQUEST_MODEL(vehHash); for (int i = 0; i < 100; i++) { if (STREAMING.HAS_MODEL_LOADED(vehHash)) { int playerPed = PLAYER.PLAYER_PED_ID(); Vector3 myCoords = GetPosition(); newVec = VEHICLE.CREATE_VEHICLE(vehHash, myCoords.X, myCoords.Y, myCoords.Z, ENTITY.GET_ENTITY_HEADING(playerPed), true, true); if (intoVehicle) { PED.SET_PED_INTO_VEHICLE(playerPed, newVec, -1); } STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(vehHash); break; } } return(newVec); }
public static int CreateRandomPed() { Vector3 vec = GetPosition(); return(PED.CREATE_RANDOM_PED(vec.X, vec.Y, vec.Z)); }
internal static HandleRef getCPtr(PED obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PED obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
internal static HandleRef getCPtr(PED obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
public PED get_phase_envelope_data() { PED ret = new PED(CoolPropPINVOKE.AbstractState_get_phase_envelope_data(swigCPtr), false); if (CoolPropPINVOKE.SWIGPendingException.Pending) throw CoolPropPINVOKE.SWIGPendingException.Retrieve(); return ret; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PED obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }