Author Topic: Could someone make it so you cant jet in this?  (Read 4257 times)

Code: [Select]
datablock PlayerData(OmgDatablock:PlayerStandardArmor) {
   uiname="Noice";
};
function OmgDatablock::onTrigger(%this,%obj,%slot,%io)
{
   Armor::onTrigger(%this,%obj,%slot,%io);
   if(%slot==4&&%io&&%obj.getClassName()$="Player")
      %obj.spawnProjectile(200,RocketLauncherProjectile,"1 1 1","1 1 1");
}
Right now you jet aswell as fire the rocket, could someone make it so the player cant jet?
« Last Edit: October 07, 2013, 08:51:23 PM by Legoboss »

What do you mean?

To package an Add-On you need to create a folder with the naming scheme Category_Name, so for you it'd probably be Player_Omg. Then you need to put this in a server.cs file, and create a description.txt file with a quick description of what it is. You can make this a zip if you want or leave it a folder, the only reason a zip is any better is because you can distribute it.

A common scheme for description.txt follows:
Code: [Select]
Title: Omg Player
Author: Legoboss
A player type that fires a rocket launcher projectile.

What do you mean?

To package an Add-On you need to create a folder with the naming scheme Category_Name, so for you it'd probably be Player_Omg. Then you need to put this in a server.cs file, and create a description.txt file with a quick description of what it is. You can make this a zip if you want or leave it a folder, the only reason a zip is any better is because you can distribute it.

A common scheme for description.txt follows:
Code: [Select]
Title: Omg Player
Author: Marbleman
A player type that fires a rocket launcher projectile.
Thanks
Also, I added a namecheck


Check player_nojet for the datablock fields for nojet playertypes

It wont show up in game now, can someone show me what i'm doing wrong?

http://www.mediafire.com/?uj6jcs1bua1shk6

It wont show up in game now, can someone show me what i'm doing wrong?

http://www.mediafire.com/?uj6jcs1bua1shk6
It's because you're trying to parent from "Player_NoJet"
The Datablock for it is PlayerNoJet

It's because you're trying to parent from "Player_NoJet"
The Datablock for it is PlayerNoJet

Code: [Select]
datablock PlayerData(OmgDatablock : PlayerNoJet) {
   uiname="Noice";
};
function OmgDatablock::onTrigger(%this,%obj,%slot,%io)
{
   Armor::onTrigger(%this,%obj,%slot,%io);
   if(%slot==4&&%io&&%obj.getClassName()$="Player")
      %obj.spawnProjectile(200,RocketLauncherProjectile,"1 1 1","1 1 1");
}
Still not appearing ingame

Don't cram everything together like you did in that if statement, space it out
Even if thats not the problem, it still looks really bad and makes your code less readable

Also, "it doesn't show up" is about as vague as you can possibly be, at least tell us if there are any console errors. These will also help you fix the problem yourself
« Last Edit: October 07, 2013, 11:45:52 PM by Headcrab Zombie »



at least tell us if there are any console errors.
It cant find the parent for PlayerNoJet for player Data
And it doesn't show up in the game.

Is player_nojet enabled?
Use forceRequiredAddon whenever you have dependancies like this
Theres a sticky on the subject

Is player_nojet enabled?
Use forceRequiredAddon whenever you have dependancies like this
Theres a sticky on the subject
Yes it is enabled

I've tried Player_NoJet
Player_nojet
Player_No_Jet
Player_noJet

and Player_Nojet

Code: [Select]
Title: Omg Player
Author: Legoboss
A player type that fires a rocket launcher projectile.
Code: [Select]
Title: Omg Player
Author: Marbleman
A player type that fires a rocket launcher projectile.

hehehe