Recent posts

#61
Community Plugins / Re: NPC/Bots implementation in...
Last post by habi2 - Nov 12, 2024, 08:10 AM
Hi Megamind i was not well for two days and now recovering fast.
The mechanism of creating npc with skin was created when npc didn't die. Now it dies and gets skin of the class which in your case maybe lovefist. I will fix it in next update. But you can
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.

About server crashing issue, it is the 64-bit version of windows (and perhaps linux too) that has bug when using RFC. I will correct it.
#62
Snippet Showroom / Re: [SNIPPET]Basic Vehicle Pas...
Last post by MEGAMIND - Nov 11, 2024, 03:02 PM
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 AM
Quote 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 side
#63
General Discussion / Re: A.I Powered Server
Last post by MEGAMIND - Nov 11, 2024, 11:42 AM
@Mikimon Thanks for visiting server, providing your suggestions and testing out the gpt..!
#64
Clans and Families / Re: [M4] - [M4]Legendary Of Le...
Last post by DEVIL - Nov 11, 2024, 09:47 AM
No probleam i will make Clan Good again That all Vcmp player know M4 Clan was a legend and its a Legend now

All gone in 1 year but I Can recover it we need to try our best If anyone have Discord link of clan or form give it to me 8)  8)
#65
Tutorials / Re: Walking npc
Last post by MEGAMIND - Nov 10, 2024, 04:16 PM
Quote from: [TDA]Speed on Nov 10, 2024, 04:12 PM
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
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.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i 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 going
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
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.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i 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 going
lool man thats awsome! nick work
u 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#new
#66
Tutorials / Re: Walking npc
Last post by [TDA]Speed - Nov 10, 2024, 04:12 PM
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
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.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i 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 going
Quote from: MEGAMIND on Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
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.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i 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 going
lool man thats awsome! nick work
#67
Tutorials / Re: Walking npc
Last post by MEGAMIND - Nov 10, 2024, 10:30 AM
Quote from: [TDA]Speed on Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
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.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it

i 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 going
#68
Tutorials / Re: Walking npc
Last post by [TDA]Speed - Nov 10, 2024, 09:30 AM
Quote from: vitovc on Nov 04, 2024, 06:44 PMit is possible but he wants you to code pathfinding for him xD
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.
maybe we can make something more easliy then this like know the nearest pos of npc and walk to it
#69
Tutorials / Re: Walking npc
Last post by [TDA]Speed - Nov 10, 2024, 09:30 AM
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
this is from npc walking script if( GetDistanceFromMeToPoint( pos ) < 2 ) WalkToPoint( pos );
pos = wanted player.Pos
so would this work ?
#70
Videos & Screenshots / Re: TDC screenshots/videos
Last post by MEGAMIND - Nov 09, 2024, 07:43 PM
Presenting npcAI( ) with Habi's NPC