Login to ZARP
|
NOTE: This is a private project im not making my own community/server this is all for education and im not advertising anything i just seek help
I am planning to code a gamemode for Garrymod and i might need some help I've done LUA coding before when i had my own MedievalRP server (using a darkRP base for it) but it was really basic and what im about to do may take some effort The gamemode will be a WW2 based class TDM (inspired by Day of Defeat) similar to the Vietnam war server there will be 2 teams (In this case Axis and Allies) I am currently thinking what system to use for classes Either XP or Coins XP An XP bar is at the top of your screen and it fills while you get kills/play, once you gain a certain level you can unlock a class i am also deciding if there is a fee for a class Coins Coins are earned by getting kills etc etc once you get a certain amount of coins you can buy a class, I also plan on introducing Tanks and planes this may be hard as I plan on making a Tank Crew class which has an option to spawn inside a tank (better tanks may be purchased) same with planes I am currently following multiple guides one being steamcommunity.com/sharedfiles/filedetails/?id=147793376 so if you guys have any suggestions for my project please post them below EDIT: Ill post more stuff that i plan to include |
|
Last Edit: 9 years 11 months ago by KapiJam.
Login or register to post a reply.
|
For info about functions etc:
wiki.garrysmod.com XP system: The XP isn't too hard, I would suggest taking a look at XP systems other dev's already made, and create your own from there. The coins: GM:PlayerDeath( Player victim, Entity inflictor, Entity attacker ) -> http://wiki.garrysmod.com/page/GM/PlayerDeath
Include in your function at least:
-> Check if the player is really dead,
-> Check if the player is a valid player,
-> (a suggestion from me:) Check if player didn't kill the same player x amount of times (abuse risk),
-> Give the " inflictor" the coins. |
|
Last Edit: 9 years 11 months ago by illuminatixs.
Login or register to post a reply.
|
Thanks, also do you know any sources of making a ability to spawn specific vehicles on the spot NOT using the Q Menu
|
|
Login or register to post a reply.
|
KapiJam wrote:
Thanks, also do you know any sources of making a ability to spawn specific vehicles on the spot NOT using the Q Menu Will post tonight. At work atm |
|
Login or register to post a reply.
|
illuminatixs wrote:
KapiJam wrote:
Thanks, also do you know any sources of making a ability to spawn specific vehicles on the spot NOT using the Q Menu Will post tonight. At work atm Ok thanks |
|
Login or register to post a reply.
|
Since you're thinking of implementing tanks and planes, NeuroTec is by far the most realistic and well-made tank and airplane mods out there. It features a huge amount of airplanes and tanks, even ships from Modern Era and WW2 era.
It's not on the workshop anymore, but I think you can still download it through here: facepunch.com/showthread.php?t=1160981 If not, try and dig for NeuroTec on the internet. It would be well worth the search. As for spawning these vehicles on the spot, I'd highly recommend you speak to the owners of Zarp, they should be able to help you out if you're looking for a vehicle spawn system similar to our SSRP one. Or just wait for illuminatixs as he's most likely coding a more intensive/realistic menu because it's meant for PERP. American Allied Soldier Models German Axis Soldier Models part 1 German Axis Soldier Models part 2 For the guns, use either Day of Defeat weapons or use the C.W 2 base with community made WW2 gun addons for this base. C.W 2 Original Modpack You'll have to search for the WW2 guns. Hopefully I helped. |
|
Last Edit: 9 years 11 months ago by stratiic.
Login or register to post a reply.
|
Stratiic wrote:
Since you're thinking of implementing tanks and planes, NeuroTec is by far the most realistic and well-made tank and airplane mods out there. It features a huge amount of airplanes and tanks, even ships from Modern Era and WW2 era. It's not on the workshop anymore, but I think you can still download it through here: facepunch.com/showthread.php?t=1160981 If not, try and dig for NeuroTec on the internet. It would be well worth the search. As for spawning these vehicles on the spot, I'd highly recommend you speak to the owners of Zarp, they should be able to help you out if you're looking for a vehicle spawn system similar to our SSRP one. Or just wait for illuminatixs as he's most likely coding a more intensive/realistic menu because it's meant for PERP. American Allied Soldier Models German Axis Soldier Models part 1 German Axis Soldier Models part 2 For the guns, use either Day of Defeat weapons or use the C.W 2 base with community made WW2 gun addons for this base. C.W 2 Original Modpack You'll have to search for the WW2 guns. Hopefully I helped. Thanks alot, I'll get to work on downloading all resources tommorow! |
|
Login or register to post a reply.
|
Here is something that looks like it would work:
Warning: Spoiler! [ Click to expand ][ Click to hide ] // Create the Jeep or Airboat entity
local _v = ents.Create( "prop_vehicle_jeep" );
if ( !IsValid( _v ) ) then error( "Vehicle didn't spawn!" ); end
// Set the model
_v:SetModel( "models/jeep.mdl" );
// Set position and angles
_v:SetPos( Vector( 0, 0, 0 ) );
_v:SetAngles( Angle( 0, 0, 0 ) );
// Optionally Set the Skin, Color [ some vehicles support setting color ], Bodykit
-- _v:SetSkin( 1 );
-- _v:SetColor( Color( 255, 255, 255, 255 ) );
-- _v:SetBodyGroup( _id, _value );
// Optionally kill the engine, lock the handbrake, and lock the doors
-- _v:Fire( "TurnOff", "", 0 ); -- TurnOn
-- _v:Fire( "HandBrakeOn", "", 0 ); -- HandBrakeOff
-- _v:Fire( "Lock", "", 0 ); -- Unlock
// Set the vehicle-script which defines how the vehicle will drive
_v:SetKeyValue( "vehiclescript","scripts/vehicles/jeep.txt" );
// Spawn and Activate ( failing to Activate an Airboat will cause the server to crash )
_v:Spawn( );
_v:Activate( );
//
// The basics of spawning a vehicle using VCMod data
// http://facepunch.com/showthread.php?t=1436864
//
local name = "taurus"
local V = {
Name = name;
Class = "prop_vehicle_jeep";
Category = "SGM Cars";
Author = "SentryGunMan, Schmal";
Information = "vroom vroom";
Model = "models/sentry/taurussho.mdl";
KeyValues = {
vehiclescript = "scripts/vehicles/sentry/taurus.txt";
};
};
list.Set( "Vehicles", V.Name, V );
//
// Spawning it
//
local _name = "taurus";
local _vlist = list.Get( "Vehicles" );
local _vt = _vlist[ _name ];
if ( !_vt ) then error( "Vehicle Table doesn't exist!" ); end
// Create the Jeep or Airboat entity
local _v = ents.Create( _vt.Class );
if ( !IsValid( _v ) ) then error( "Vehicle didn't spawn!" ); end
// Set the model
_v:SetModel( _vt.Model );
// Set position and angles
_v:SetPos( Vector( 0, 0, 0 ) );
_v:SetAngles( Angle( 0, 0, 0 ) );
// Optionally Set the Skin, Color [ some vehicles support setting color ], Bodykit
-- _v:SetSkin( 1 );
-- _v:SetColor( Color( 255, 255, 255, 255 ) );
-- _v:SetBodyGroup( _id, _value );
// Optionally kill the engine, lock the handbrake, and lock the doors??
-- _v:Fire( "TurnOff", "", 0 ); -- TurnOn
-- _v:Fire( "HandBrakeOn", "", 0 ); -- HandBrakeOff
-- _v:Fire( "Lock", "", 0 ); -- Unlock
// Set the vehicle-script which defines how the vehicle will drive *Mandatory*
// It can be done like this
_v:SetKeyValue( "vehiclescript", _vt.KeyValues.vehiclescript );
// Or, because of the way VCMod data is set up, you can loop through and use the key.. useful if it has multiple keyvalues to input.
-- for k, v in pairs( _vt.KeyValues ) do
-- _v:SetKeyValue( k, v );
-- end
// Spawn and Activate ( failing to Activate an Airboat will cause the server to crash )
_v:Spawn( );
_v:Activate( ); Other than that, just check out the documentation at the wiki page I gave you earlier and look up some tutorial video's on basic game mode making within gmod. Feel free to add me to steam if you need some help. |
|
Login or register to post a reply.
|