Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - [TDA]Speed

#1
fixed from along time in linux you should use full plugin name with .so
thanks
#2
well habi i guess the plugins is bugged on linux 64 bit plugins of npc not loading and i tested this npc on windows of same version of npc the 0.4.7.1 and working for windows everything okey but on windows RFC from server side crashing the npc
for linux dosnt want to load the plugins of npc in npcscripts

the npc script is shooting anyone shoot near him and using your script of npc.fire
this error i got on npc linux 64 when i shoot him for first time he starting shooting normal and no bugs when i go away script will kill timer of shooting when i back again to shoot him he shot 1 time then timing out

Failed loading plugin: rpclib
Failed loading plugin: z-finder
 Loaded 0 plugins.
Connecting to 127.0.0.1: 8205. Connected. Player 'Ammu-Nation_Man' ID 0 connected.
[SCRIPT] ID: Ammu-Nation_Man has joined the server
ID 0. Vice City Gang Wars. Ammu-Nation_Man
Warning: Cannot update weapon slot for weapon 114
Warning: Cannot update weapon slot for weapon 114
Warning: Cannot update weapon slot for weapon 114
Player 'Ammu-Nation_Man' ID 0 disconnected (timeout).
#3
also @habi whenever i use RFC(F from server side to bot script it always crash the server
#4
Quote from: MEGAMIND on Apr 09, 2025, 02:04 PM
Quote from: PLAYER on Apr 09, 2025, 01:55 PMI used the Same Structure You Gave me:-
ConnectNPCEx("Bot", Vector(-1375.21, -664.22, 14.1484), 90.0, 1, 26, 255, "shoot.nut", true, "127.0.0.1", "rpclib actionlib");

But its still showing error
Failed loading plugin: rpclib
Failed loading plugin: actionlib
 Loaded 0 plugins


make sure these are linux plugins not the win architecture, also  make sure the plugins are in right path
npcscripts/plugins

i have the same error too though iam using the correct path
home/container/npcscripts/plugins/rpclib64.so
#5
what this function used for ?
this function used to give the player ammo or weapon without changing his current weapon

GiveAmmoToWeapon(player, WeaponID, ammo);


place this function anywhere
function GiveAmmoToWeapon(player, weapon, amount)
{
local currentwep = player.Weapon;
local currentammo = player.GetAmmoAtSlot(player.Slot);
local weapon = weapon;
amount = amount;
player.GiveWeapon(weapon,amount);
if (currentwep != weapon ) player.SetWeapon(currentwep,currentammo);
}


example usage

if (player.GetWeaponAtslot(6) == 26) GiveAmmoToWeapon(player, 26, 30);

if player holding shotgun and picked m4 it will not change his weapon and will give him ammo for m4 without changing his weapon
#6
Quote from: habi2 on Feb 05, 2025, 03:53 PM
Quote from: [TDA]Speed on Feb 04, 2025, 04:42 PMHello hapi, i wonder if you will add something like Npc.Walkto and Npc.Run like normal player walking and running because walktopoint is walking without anim and not so perefct i hope you added these two

I understand you want npc.walkto( position ) and npc.run( ) like normal player walking and running. It would be great to have it pre-built.

i will check if anything can be done about this issue.
alright, thank you
#7
Tutorials / Re: Walking npc
Feb 05, 2025, 11:54 AM


target<-null;timerid<-null;
WALK_START <- Vector(-872.146, -431.502, 11.5288);
WALK_END <- Vector( -870.825, -296.79, 11.173);
walking <- false;
reached <- false;
function WalkToPoint(point)
{
target=point;
if(timerid==null)
{
timerid=SetTimerEx("step_forward",100,0);
        //Remotely calling functions 'compilestring' of server.
RFC(F("compilestring")("function SetWalkingAnimation(id){ local p=FindPlayer(id); if(p && IsPlayerNPC(id))p.SetAnim(0,0);else WalkTimer"+GetMyID()+".Delete()}"))();
RFC(F("compilestring")("WalkTimer"+GetMyID()+"<-NewTimer(\"SetWalkingAnimation\",100,0,"+GetMyID()+")"))();
}
}

function Walk(pos)
{
walking = true;
target = pos;
local lastpos= GetMyPos();
local newpos= pos;
local z=FindZFor2DCoord(newpos.x, newpos.y);
if(!z)
{
Stop();
return;
}
else newpos.z=z+ 0.5; //Update z co-ordinate so that npc do not float in air/fall down.

//Check wall, etc.
if(newpos.z-lastpos.z > 0.5)
{
//cannot move forward
Stop();
SendChat("I can't go further");
print("the jump is "+(newpos.z-lastpos.z)+" to "+newpos+" from "+lastpos+"\n");
return
}
//step_forward()
SetLocalValue(F_ANGLE, atan2(-(target.x - GetMyPosX()), target.y - GetMyPosY()));
//SetLocalValue(F_POSX,newpos.x);
//SetLocalValue(F_POSY,newpos.y);
//SetLocalValue(F_POSZ,newpos.z);
SetLocalValue(I_KEYS, KEY_ONFOOT_FORWARD)
SetLocalValue(V_ONFOOT_SPEED, (newpos-lastpos).Normalised()*0.12688)
move2(lastpos,GetMyFacingAngle(), 0.22,0)
SendOnFootSyncDataLV()
//if( GetDistanceFromMeToPoint( target ) < 1 )
//{
//SetMyPos(target);
//Stop();
//}
}

function Stop()
{
if(timerid!=null)
KillTimer(timerid)
//Send stationary-npc packet (stop walking)
SetLocalValue(I_KEYS, 0)
SetLocalValue(V_ONFOOT_SPEED, Vector(0,0,0))
SendOnFootSyncDataLV()
walking = false;
}

function onDestinationReached()
{
if( GetDistanceFromMeToPoint( WALK_START ) < 2 )
WalkToPoint( WALK_END );
else if( GetDistanceFromMeToPoint( WALK_END ) < 2 )
{
WalkToPoint( WALK_START );
        //print something on server console.
RFC("print")("npc: i completed one round of patrol");
}
}
function step_forward()
{
local newpos=GetMyPos()+(target-GetMyPos()).Normalised()*0.14;
newpos.z=FindZFor2DCoord(newpos.x, newpos.y)+1.0425;
//SetLocalValue(V_POS, newpos);
SetLocalValue(F_ANGLE, atan2(-(target.x-GetMyPosX()),target.y-GetMyPosY()));
//if((target-GetMyPos()).Length()<0.8)//reached destination
////{
//if(timerid!=null)
// KillTimer(timerid);
//timerid=null;
//stop timer of server
//RFC(F("compilestring")("WalkTimer"+GetMyName()+".Delete()"))();
//}
//else SendOnFootSyncDataLV();
//if(timerid==null)
//onDestinationReached();
}
function OnNPCSpawn()
{
//SetTimerEx("SetMyPos",700, 1, WALK_START );
// SetMyPos(WALK_START);
//print(GetMyPos());
//SetTimerEx("Walk", 1000, 1 );
//WalkToPoint( WALK_END );
//Acquire weapon and skin
RFC(F("compilestring")("FindPlayer("+GetMyID()+").SetWeapon(4,1);"))();
RFC(F("compilestring")("FindPlayer("+GetMyID()+").Skin=1"))();
//SetTimerEx("SetLocalValue", 1000,1, I_CURWEP, 4);
//if( GetDistanceFromMeToPoint( pos ) < 2 ) WalkToPoint( pos );
SetTimerEx("checktowalk", 1000, 0 );
}

function checktowalk()
{
local msg;
    local name;
local pos;
local Distance;
local x;
local num_streamed_in = 0;
local num_connected = 0;
x=0;
while(x!=MAX_PLAYERS) {
    if(IsPlayerConnected(x)) {
        num_connected++;
        if(IsPlayerStreamedIn(x)) {
            num_streamed_in++;
        name=GetPlayerName(x);
pos=GetPlayerPos(x);
Distance=GetDistanceFromMeToPoint(pos);
if (Distance < 30) if (walking == false && reached == false) Walk(pos);
if (Distance > 35) Stop();
//if (Distance < 1)
//{
//SetMyPos(x.pos);
//walking = false;
//reached == true;
//}
if (Distance > 2 && reached == true)
{

walking = false;
reached == false;
}

if(GetPlayerState(x) == PLAYER_STATE_DRIVER) {
    msg=format("I see %s driving vehicle: %d",name,GetPlayerVehicleID(x));
SendChat(msg);
}

}
}
x++;
};
}

function OnNPCScriptLoad(params)
{
if(!MiamiScale_Init("default.map"))
{
SendChat("My map is not loaded. Bye");
QuitServer();
}
}
function OnNPCScriptUnload()
{
MiamiScale_Unload();
}



#8
Tutorials / Re: Walking npc
Feb 05, 2025, 11:52 AM
i made this one but the problem npc's location not updated after move if i used /loc it will show the npc's last location the pos he was standing and if i move away he will back again to his last pos so how to sync npc.pos to server
#9
Quote from: MEGAMIND on Feb 04, 2025, 05:06 PM
Quote from: [TDA]Speed on Feb 04, 2025, 04:42 PMHello hapi, i wonder if you will something like Npc.Walkto and Npc.Run like normal player walking and running because walktopoint is walking without anim and not so perefct i hope you added these two

u can set anim on walk amd timers.. theres example in npc wiki, same goes for running
not perfect you can see sometimes will sure missed because timers and anims i meant like normal npcs walk exmple in offline game walking smoothly
#10
Hello hapi, i wonder if you will add something like Npc.Walkto and Npc.Run like normal player walking and running because walktopoint is walking without anim and not so perefct i hope you added these two
#11
Servers / Vice City Gang Wars
Jan 27, 2025, 02:05 PM



Vice City Gang Wars
Classic turf wars with modern systems



IP Address: 51.38.237.230:8195 
Player Slots: 100 
Discord: Join here 
Facebook: Visit page 






About the Server

Vice City Gang Wars brings back the essence of GTA San Andreas-style turf battles, mixed with 
police operations, military forces, robberies, and advanced gang systems.

Fight for territory, build your gang empire, control zones, dominate missions, 
and become the most feared organization in Vice City.



Core Gameplay Systems

Gang Wars & Zones – Capture territories to unlock vehicles, income and power. 
Police System – Arrest wanted players by knocking them down and pressing B. 
Gang Vehicles – Spawn using !getgangcar. More zones = more vehicles. 
VIP System – Earn GW from daily missions to unlock VIP benefits. 
Saved Weapons – Certain rifles and shotguns stay after death. 
Vehicle Bombs – Install and detonate remotely. 
Army System – Hydras, Rhinos, and aerial bombing. 



Main Missions

1. Bank Robbery – Drill the safe, plant the bomb and escape with the money. 
2. Boatyard Attack – Control yachts to store gang weapons. 
3. RC Van Bombing – Plant four bombs to win 800 gang score. 
4. Cubans vs Haitians – Infiltrate, plant bombs and destroy the base for 10 minutes. 



Extra Features

• Gang Leaders (2000 kills) & Underboss (1000 kills) 
• Kidnapping System 
• Bank Van Robbery 
• Drive-By & Heli-Kill only during active wars 
• Daily Missions (spray graffiti, tasks, etc.) 
• Gang Skins selectable at spawn 



Balance System

• Team markers visible only with 5+ players or during wars 
• Yacht missions can be stopped by destroying the yacht (RPG recommended) 



Server Commands

General: 
/changepassword, /admins, /country, /level, /msg, /buyvip, /viptime, /helpcmd 

Money: 
/money, /pay, /withdraw, /deposit 

Player Info: 
/hp, /loc, /ping, /fps, /afk, /stats, /setstats, /spec, /ignore, /report 

Vehicles: 
/gangcars, /copcar, !getgangcar 

Weapons: 
/spawnwep, /dropweapon, /delwep, /disarm 

Gangs: 
/ganginfo, /gang, /requestjoin, /leavegang, /zones 

Missions: 
/attackboatyard, /buydrill, /buybomb, /bankrob 



Credits

Snow 
Speed 
Xann / Ridbrine (Old Staff) 
EgyKing 

Special Thanks: 
H.a.s.a.n • GTA MODS (Ahmad412) • Sebastian 

Beta Testers 
[KF]Adhem • H.a.s.a.n • [RT]Claude_Speed • [TDAt]Sonny^Forelli 



Join now and dominate Vice City
Hosted by Adrenaline
#12
Oh okey thanks
#13
sorry but i dont understand this plugin allows you to use client side scripts with normal server scripts ?
#14
thank you for this
#15
i dont think its a good thing for some players or not but some players who have a slow bad internet will not abel to join some servers for online store files example RTV server when i join it every time it say http timeout or something like that i think the old way to store files was better or maybe make a vote to see if vcmp community players like it or no
VCMP was the only game i play because its not require high speed internet (my net speed some times be lower then 250 kb)
i hope you guys understand me,
try to keep vcmp for poor peoples  :)