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.

Messages - Inferno
1
Off-Topic General / Re: Thank you for everything...
« on March 22nd, 11:15 PM »
A positive step always require a bit of sacrifice.
Good luck ahead in life bro.
Stay safe stay blessed. Adios
2
Script Showroom / [Release] Re: In-game object hide/show editor
« on March 17th, 11:58 AM »
Nice
3
Vehicle Showroom / Re: Bobster
« on March 4th, 09:19 PM »
Superb
4
Bugs and Crashes / Re: Why is this happening?
« on February 25th, 10:44 AM »
Quote from SexAppeal on February 25th, 05:24 AM
Quote from Athanatos on February 24th, 09:58 AM
Does this happen upon joining or spawning? If yes, this can be ignored, since it's the VCMP client not properly manage model resources. They do load upon approaching the specific vehicles.
It occurs in both cases, for example; I was testing 2 vehicles and it only loaded 1.
Happening in every server? Or a particular server. If in 1 server, then there might be a custom vehicle in that server with broken texture/collision which is failing to load.

Else for the modded game, it is always preferred to play vcmp on fresh and unmodified GTA VC.
6
Support / Re: When i open a server the game crashes
« on January 27th, 11:30 PM »
Make sure you are using a clean gta vc and not a modded one and has complete files of it
7
Quote from Athanatos on January 26th, 03:39 PM
This might seem why RCNR kept crashing? It was full with respawing pickups.
Probably.
Because , 10 respawning pickups lag where 10 non-respawning doesnt.
And it increases with increase of pickups.
Another test showed that having 18 Respawning pickups at Loc BF when more than 3 4 are claimed by players, horribly lagged the server and crashed it within minutes.
8
Snippet Showroom / Custom Pickup Respawn Function
« on January 26th, 08:27 AM »
Why need of this when you have Pickup.Timer?

Here's why : https://forum.vc-mp.org/?topic=8306

Snippets

Alternative #1 ( Aligned Timer : Use only if your server's time rate is 1000ms ( 1 second ) as OnTimeChange depends on Time Rate )

OnScriptLoad
Code: [Select]
SetToRespawn<- array( 5000, null);
 RespawnCD <- 0;


OnTimeChange
Code: [Select]
function onTimeChange( lastHour, lastMinute, hour, minute )
{
    for(local pi = 0; pi < 2000; pi++)
    {
        local pickup = FindPickup(pi);
       if(pickup)
        {
if(RespawnCD < 16) {
RespawnCD ++; // increase respawn cd till it doesnt reach 16 seconds
}
if(SetToRespawn[pickup.ID] == true && RespawnCD > 14) { // checks if pickup is set to respawn && respawning countdown is greater than 14 seconds
RespawnCD = 0; // resets respawn cd
SetToRespawn[pickup.ID] = false; // disables respawn again without execution
pickup.World = 1; // default world
}
}
}
}

Anywhere in main script
Code: [Select]
function onPickupPickedUp( player, pickup )
{
SetPickupToRespawn(pickup); // sets pickup to respawn upon picking up
}

function SetPickupToRespawn(pickup)  // sets pickup into respawning
{
SetToRespawn[pickup.ID] = true;
pickup.World = 5555;
}

function iCreatePickup( model, pos ) // custom function so it can set class
{
local pick = CreatePickup( model, 1, 1, pos, 255, true );
SetToRespawn[pick.ID] = false;
}


Usage
Quote
* Paste them correctly
* Create pickups using iCreatePickup(mode,pos) so class gets set i.e SetToRespawn[pickup.ID]
* This is used for example & sample only, the pickup which has been set to respawn can respawn even after 1s or 15s as its dependant on RespawnCD , so u will need to modify it.
Alternative #2 & #3

Code: [Select]

// onscriptload

SetToRespawn <- array(5000,null);

// ontimechange wont be used here

// onpickuppickedup

Code: [Select]
function onPickupPickedUp( player, pickup )
{
SetPickupToRespawn(pickup);
}

// function

Code: [Select]
function SetPickupToRespawn(pickup)
{
SetToRespawn[pickup.ID] = true;
 NewTimer("RespawnPickup", 15000, 1, pickup.ID); // unrecommended, Use Extended Timer here instead ( alternative #3 )
pickup.World = 5555;
}

// timer callback to use
Code: [Select]
function RespawnPickup(pick)
{
local pickup = FindPickup(pick);
if(pickup && SetToRespawn[pickup.ID] == true) {
SetToRespawn[pickup.ID] = false;
pickup.World = 1;
}
}
9
Been Using Pickup.Timer = time in milliseconds?
Here are some observations and assumptions regarding it.
- Having 7-8 Pickups in range of 50m which are set to respawn by pickup.Respawn, usually cause certain memory leaks which either lags the server or specific players near these pickups and rarely even both. This phenomenon may be same for more or less pickups.
- I had first observed this in VCCnR at mall, where majority of people ( with average or bad internet and some with good even ) would lag in mall, as robber or as cop. The mall had 9 respawning pickups. It might be because more than 3 4 pickups are being set to respawn by default function which is causing memory leak or sending players in range of 50m to pickups, some packets ( an assumption ).
- Why do i think its related to Pickup.Respawn? Well i tested non-respawning pickups in range of 25m , and placed 12 pickups without respawn ability. There was no memory leak or lag even when each pickup had one player standing on it. This certain gives an impression about pickup.Timer causing that lag.
- When you are getting such lag by this, setting your world to some other world than these pickups, the lag fades away rapidly ( only if it is not your internet being bad but script lag )
- Since, pickup.Respawn has inbuilt timer, my assumption is that, it was much ignored in development and this is an unnoticed memory leak/lag leak.  ( assumption )
- I have tested it elsewhere than VCCNR as well. Added 10 respawning wep pickups at loc BF and asked some players to pick some of them, and after a few moments, everyone in that area started having high jitre but players away from that area were fine and had no lag. ( Observation )
- These are some observations and assumptions regarding this function. Calculations of pickups to reproduce the bug might be wrong, but these memory leaks still exist. Couldnt gather the videos showing that since my laptop is running vcmp at 20-40 fps least and wont handle recorder.



Temporary Solution:
https://forum.vc-mp.org/?topic=8307 ( custom pickup timer )

10
Snippet Showroom / Re: Top Spree
« on January 24th, 10:51 PM »
So many timers only to execute 1 function.
11
Off-Topic General / Re: III Multiplayer - Resource Site
« on January 22nd, 11:27 AM »
Good luck.


Yet another SAMP player into VCMP gg
12
General Discussion / Re: Map Editing
« on January 21st, 11:22 PM »
https://forum.vc-mp.org/?topic=1303.0

We use this ingame map editor scripts to add maps.
13

Intro
Quote
This custom snippet, will count the number of checkpoints created in the Server. You can also set its type to make it execute something based on its type instead of its ID
Functions
Code: [Select]
function iCreateCheckpoint( player, world, isSphere, pos, argb, radius ) // create a cp, its same as default one, just add an 'i' in start
{
CreateCheckpoint(player, world, isSphere, pos, argb, radius);
CheckpointCount++;
cpType[CheckpointCount] =  null;
print("Checkpoint Created, Count: "+CheckpointCount+"");
}

function iDeleteCheckpoint( checkpoint ) // delete a cp
{
cpType[checkpoint.ID] = null;
checkpoint.Remove();
CheckpointCount--;
print(" Checkpoint Removed, Count : "+CheckpointCount+" ");
}

function SetCheckpointType( checkpoint, type ) { // sets cp type
local cp = FindCheckpoint(checkpoint);
if(cp) {
cpType[cp.ID] = type;
print("Checkpoint ID :"+cp.ID+" type set to "+type+" ");
}
}


OnScriptLoad
Code: [Select]
CheckpointCount <- -1;
 cpType <- array(2000,null);




Example
Code: [Select]

// OnScriptLoad
iCreateCheckpoint( null, 0, true, Vector(90.697, 278.878, 21.7719), ARGB(255, 255, 255, 255), 2.2); // golf cp
iCreateCheckpoint( null, 0, true, Vector(87.4472, -1453.78, 10.5655), ARGB(255, 255, 255, 255), 2.2); // pole cp
SetCheckpointType( 0, "golf" ); //  sets type
SetCheckpointType( 1, "pole" ); // same

// OnCheckpointEntered

function onCheckpointEntered( player, checkpoint )
{
if (cpType[checkpoint.ID] == "golf") {
Message("[#ffffff] Golf Club ");
}
else if(cpType[checkpoint.ID] == "pole") {
Message("[#ffff11] Pole Club ");
}   
}



Note
Quote
~ There is another alternative to count the checkpoints as well, but i lost that snippet.
~ The checkpoint count will only increase or decrease upon using these custom functions and not for default ones, same goes for the checkpoint type thing
~ You can add more classes to execute checkpoint functions based on other things than ID, i.e pos, color etc
14
Object Showroom / Re: Front Page Cafe
« on January 10th, 05:57 PM »
Accessible? Damn cool.
15
Snippet Showroom / Re: onPickupExited (New Custom Event)
« on January 9th, 01:07 PM »
Good work.