ReSpawn Time

Started by PsyChO_KiLLeR, Mar 03, 2015, 10:51 AM

Previous topic - Next topic

PsyChO_KiLLeR

Well i create a pickup in my server but its respawn cant set when i pick a pickup it respawn after 0  sec again and again how to set respawn time
 
if ( pickup.Model == 408 )
                {
                pickup.RespawnTime = 60;
                 IncCash( player, 2000 );
                Message( "You have found 2000 cash in bank." );
}

.

I'm guessing you should just make the pickup automatic `Pickup.Automatic` (boolean: true|false) And the pickup will re-spawn automatically after the time from `Pickup.Timer` alias `Pickup.RespawnTime` (integer: seconds). You can also force a pickup to re-spawn immediately with the `Pickup.Respawn()`function.
.

PsyChO_KiLLeR


.

.

MacTavish

@S.L.C he wants you to make an pickup code for him

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

PsyChO_KiLLeR

nope i already have pickup but i want that respawn line code

.

Quote from: PsyChO_KiLLeR on Mar 04, 2015, 06:53 AMnope i already have pickup but i want that respawn line code

It's just a member function of the Pickup type like I already mentioned :-\
pickup.Respawn();
.

MacTavish

I would say that he have to try this i am not sure it succeed or not because i've not tried it if ( pickup.Model == 408 )
                {
                pickup.RespawnTime = 6000;
                 IncCash( player, 2000 );
                Message( "You have found 2000 cash in bank." );
}

If the pickup respawn after 6secs then its working fine

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Kratos_


Post us the code which creates your pickup during server startup . Are you receiving prize & reward messages more than usual ?  I'm guessing that you have created an infinite timer which is creating a cyclone of pickups at the same vector position & thus they are getting overlapped . But , its an assumption .
Anyway , post us that code which creates your pickup & also function onPickupPickedUp( player, pickup ) .
In the middle of chaos , lies opportunity.

PsyChO_KiLLeR

Worked in 0.4 it was 60= 1 sec so i set 60000 = 1minute
it works
thnx