it's very good
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 MenuQuoteAdded support for checkpoints. (Only one checkpoint at a time should be shown to a player.)
Added support for spheres.
Quote from: Thijn on May 29, 2015, 05:50 AM<weapon> - the ID of the weapon your custom weapon behaves like; putting 6 in here will make your weapon behave like a baseball batI was omitting/ignoring that detail xD, for that, I was confusing the things
CreatePickup( 280, 1, 60, Vector( -1744.31, -299.216, 14.8683 ), 255, true ); // m4 group
CreatePickup( 274, 1, 50, Vector( -1741.35, -294.67, 14.8683 ), 255, true ); // col group
CreatePickup( 274, 1, 50, Vector( -1691.8, -177.954, 14.8683 ), 255, true );
CreatePickup( 289, 1, 40, Vector( -1663.16, -129.052, 14.8683 ), 255, true ); // m6 group
function onPickupPickedUp( player, pickup )
{
local model = pickup.Model, id = player.ID, p = pinfo[id];
switch( model )
{
case 274:
case 280:
case 289:
FindPickup( pickup.ID ).Remove();
FindPickup( pickup.ID ).RespawnTime( 5 );
return;
break;
case 408:
return gMessage( id, mGreen, "Your Financial Status - Cash: $" + Bytes( p.Cash ) + ", Bank: $" + Bytes( p.Bank ) );
break;
default:
break;
}
}
Quote from: S.L.C on May 25, 2015, 03:47 PMI think you need the function that decides whether a pickup can be picked by a player or not.function onPickupClaimPicked(player, pickup)
{
return true; // true: Allow to pick-up. false: deny pick-up.
}
CreatePickup( 280, Vector( -1744.31, -299.216, 14.8683 ) ); // m4 group
CreatePickup( 274, Vector( -1741.35, -294.67, 14.8683 ) ); // col group
CreatePickup( 274, Vector( -1691.8, -177.954, 14.8683 ) );
CreatePickup( 289, Vector( -1663.16, -129.052, 14.8683 ) ); // m6 group
function onPickupPickedUp( player, pickup )
{
local model = pickup.Model, id = player.ID, p = pinfo[id];
switch( model )
{
case 274:
return player.SetWeapon( 274, 50 );
break;
case 280:
return player.SetWeapon( 280, 60 );
break;
case 289:
return player.SetWeapon( 289, 40 );
break;
case 408:
return gMessage( id, mGreen, "Your Financial Status - Cash: $" + Bytes( p.Cash ) + ", Bank: $" + Bytes( p.Bank ) );
default:
break;
}
pickup.RespawnTime = 5;
}
Quote from: stormeus on May 25, 2015, 03:04 PMThat won't work because the Angle is a Quaternion with X, Y, Z, and W components. You need to use veh.EulerAngle.Z or store all the components.
Quote from: stormeus on May 25, 2015, 02:37 AMDid you convert to radians?
function DegtoRad( degree ) return degree * 0.0174533;
I have to multiply it for the angle z?