SendCommand("_npc_skin_request 65");
to set npc skin anytime. The above code set it to 65, as we discussed before. OnNPCSpawn might be the right place.Quote from: Mohamed Boubekri on Nov 27, 2017, 09:24 PM@! Brother zeus You Can Do That's For For Driver Cars
If You Can't / Its oK,
About That's Niice Work, But i Want For the Driver Vehicles
If You Can Do Sent Me Here Thanks.
Quote from: D4rkR420R on Nov 28, 2017, 05:49 AMQuote from: Mohamed on Nov 27, 2017, 09:24 PM@! Brother zeus You Can Do That's For For Driver Cars
If You Can't / Its oK,
About That's Niice Work, But i Want For the Driver Vehicles
If You Can Do Sent Me Here Thanks.
It isn't possible to spectate yourself, or in this case, the driver. Attempt to spectate yourself in your server & you'll see. We usually spectate ourselves on purpose to disable spectating mode.
onentervehicle
if (vehicle.Driver != null)
{
if (vehicle.Driver.ID != player.ID)
{
player.SpectateTarget = vehicle.Driver;
vehicle.Driver.SpectateTarget = player; // Driver also spectates the player
}
else
{
local MaxOccupants = 8;
for (local i = 1; i <= MaxOccupants; i++)
{
local Occupant = vehicle.GetOccupant(i);
if (Occupant != null && Occupant.SpectateTarget == null)
Occupant.SpectateTarget = player;
}
}
}
onexitvehicle
if (player.SpectateTarget != null)
player.SpectateTarget = null; /* It's not necessary to use this line */
if (vehicle.Driver == null)
{
local MaxOccupants = 8;
for (local i = 1; i <= MaxOccupants; i++)
{
local Occupant = vehicle.GetOccupant(i);
if (Occupant != null)
{
// Clear the spectate target for all occupants
if (Occupant.SpectateTarget != null)
Occupant.SpectateTarget = null;
}
}
}
else
{
// If vehicle has a driver, make sure the driver stops spectating as well
if (vehicle.Driver.SpectateTarget != null)
vehicle.Driver.SpectateTarget = null;
}
u can if u have a passenger at a sideQuote from: [TDA]Speed on Nov 10, 2024, 04:12 PMu cant test that npc.ai at my server more of that want in depth knowledge ? https://forum.vc-mp.org/index.php?topic=3350.msg54387#newQuote from: MEGAMIND on Nov 10, 2024, 10:30 AMQuote from: [TDA]Speed on Nov 10, 2024, 09:30 AMi did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is goingQuote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xDmaybe we can make something more easliy then this like know the nearest pos of npc and walk to it
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.Quote from: MEGAMIND on Nov 10, 2024, 10:30 AMlool man thats awsome! nick workQuote from: [TDA]Speed on Nov 10, 2024, 09:30 AMi did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is goingQuote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xDmaybe we can make something more easliy then this like know the nearest pos of npc and walk to it
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AMQuote from: [TDA]Speed on Nov 10, 2024, 09:30 AMi did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is goingQuote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xDmaybe we can make something more easliy then this like know the nearest pos of npc and walk to it
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AMlool man thats awsome! nick workQuote from: [TDA]Speed on Nov 10, 2024, 09:30 AMi did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is goingQuote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xDmaybe we can make something more easliy then this like know the nearest pos of npc and walk to it
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AMi did it eventaully u can do it too, get the nearest player id from distanceotpoint and walk it there.. an example here it moves twoards the loaction of player where ever it is goingQuote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xDmaybe we can make something more easliy then this like know the nearest pos of npc and walk to it
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xDmaybe we can make something more easliy then this like know the nearest pos of npc and walk to it
actually there is alot of AI-stuff can be done (and needed for DM-gamemods). I feel fear when I imagine how much work should be done to make npc to act like real players in terms of DM.
Quote from: habi2 on Nov 04, 2024, 05:05 PMHi [TDA]Speed, we can definitely think about making a path-finding npc. In fact from an IPL file, the path can be found. Ah yes, when given command to go to a location, it will walk through the road making left turn or right turn. it is possible now.i just knew that path finding maybe could be lag but i tried to understand the walking script code of yours what if player gets close exmple npc cop and wanted player if the wanted player near to npc he will start follow him like