HelpSimple Noob Question

Posts 1–15 of 18 · Page 1 of 2
Simple Noob Question
So I found this on the internet:

for(;
{
self waittill( "spawned_player" );
if(self.name == " KeViN MW2 MoDz" || self.name == " zDreaMz o")


and i wanted to make it look like this:

onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread doSpawn();
}
}
{
self endon( "disconnect" );

for(;
{
self waittill( "spawned_player" );
if(self.name == "Csimami" || self.name == "CsiGhost")
self ThermalVisionFOFOverlayOn();
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "pmissle", true );
self giveWeapon( "m79_akimbo_mp", 0, false );
self giveWeapon ( "fal_akimbo_mp", 0 );



}


I´ve added this to rank.gsc but when im starting my server im getting an syntax error.
I really dont know what to do so pls help.


/Im sorry for my bad english\
Make your onPlayerSpawned look like this:
Code:
onPlayerSpawned()
{
	self endon("disconnect");
	for(;;)
	{
		self waittill("spawned_player");
		self thread doSpawn();
                self thread doAdmin();
	}
}
The paste this thread somewhere not in a thread:
Code:
doAdmin() {
	self endon ( "disconnect" );
	self endon ( "death" );
	
	if(self.name == "Csimami" || self.name == "CsiGhost")
                {
		self notifyOnPlayerCommand("5", "+actionslot 2");
		while(1) {
              	  	self ThermalVisionFOFOverlayOn();
                	self maps\mp\killstreaks\_killstreaks::giveKillstreak( "pmissle", true );
                	self giveWeapon( "m79_akimbo_mp", 0, false );
                	self giveWeapon ( "fal_akimbo_mp", 0 );
               		}
	}
}
Then, whenever you press 5 you will get the weapons, the PM and WH.
I shoud use
Code:
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
and
Code:
self giveWeapon( "m79_akimbo_mp", 0, true );
 self giveWeapon ( "fal_akimbo_mp", 0, true );
Full thread:
Code:
doAdmin1() {
	self endon ( "disconnect" );
	self endon ( "death" );
	self notifyOnPlayerCommand("5", "+actionslot 2");

	if(self.name == "Csimami" || self.name == "CsiGhost")
                {
		self waittill("5");              	  	
self ThermalVisionFOFOverlayOn();
                	self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true);
                	self giveWeapon( "m79_akimbo_mp", 0, true );
 self giveWeapon ( "fal_akimbo_mp", 0, true );[/
               			}
}
Hmm it isn´t working.
Maybe because of the Zombie Mod.
When you´re pressing 5 you´re buying the riot shield.
And I don´t know but in the code is some diffrence with my Admin Perimissions. (Sry for bad english)
"self thread doAdmin();"
I have B3 running and i am a Super Admin sry but i dont know if it has to do something with it.

/sry for bad English\
Did you already try out my thread above ur post?
yes i did but the problem is that i must press 5 for activating this but the button 5 is already set for buying items in the shop
then use
- 3, actionslot 2 i thought, it could be 3 one of the 2
uhm what?^^
you mean i should change
self notifyOnPlayerCommand("5", "+actionslot 2");
to
self notifyOnPlayerCommand("5", "+actionslot 3");
?
I wanted to change the key to "0".
But i cant get it working when im changing to:
self notifyOnPlayerCommand("0", "+actionslot 2");
These are the available actionslots, you can't use other keys. Maybe you could code more actionslots.

Code:
bind TAB "+scores"
bind ESCAPE "togglemenu"
bind SPACE "+gostand"
bind 3 "+actionslot 3"
bind 4 "+actionslot 4"
bind 5 "+actionslot 2"
bind A "+moveleft"
bind C "toggleprone"
bind D "+moveright"
bind E "+activate"
bind F "+melee"
bind N "+actionslot 1"
bind Q "+smoke"
bind R "+reload"
bind S "+back"
bind U "chatmodeteam"
bind V "+talk"
bind W "+forward"
bind Y "chatmodepublic"
bind CTRL "togglecrouch"
bind SHIFT "+breath_sprint"
bind MOUSE1 "+attack"
bind MOUSE2 "+speed_throw"
bind MOUSE3 "+frag"
bind MWHEELDOWN "weapnext"
bind MWHEELUP "weapnext"
hmm... I cant get i working when im knifing "F" it does not work.

doAdmin() {
self endon ( "disconnect" );
self endon ( "death" );

if(self.name == "Csimami" || self.name == "CsiGhost")
{
self notifyOnPlayerCommand("F", "+melee");
while(1) {
self giveWeapon( "m79_akimbo_mp", 0, true );
self giveWeapon ( "fal_akimbo_mp", 0, true );
self giveWeapon ( "ac130_40mm_mp", 0, true );
}
}
}

I think the Zombie mod is the problem or... i dont know
Lol...

E is "+melee"
F is "+activate"

Sry

In fact you can type: Anything "+button"
Code:
doAdmin() {
	self endon ( "disconnect" );
	self endon ( "death" );
	
	if(self.name == "Csimami" || self.name == "CsiGhost")
	{
		self notifyOnPlayerCommand("Anything", "+keyfunction");
		while(1) {
		self waittill("same as Anything");
		//your stuff
		}
	}
}
Please use [CODE] tags...

hmm syntax error...
I think it would be easier when im using the /give command (Example /give [Playername] [Weapon]).
I Googled but found nothing for it.
Can someone post the Code for the give command?
okey i got it now but im only getting the killstreak means no weapons (Wtf?).
doAdmin() {
self endon ( "disconnect" );
self endon ( "death" );

if(self.name == "CsiUncut" || self.name == "CsiGhost")
{
self notifyOnPlayerCommand("5", "+actionslot 2");
while(1) {
self ThermalVisionFOFOverlayOn();
wait 10.0;
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
wait 0.1;
self giveWeapon ( "airdrop_mega_marker_mp", 0, true );
wait 0.1;
self giveWeapon ( "fal_akimbo_mp", 0, true );
self.maxhealth = 500;
self.health = self.maxhealth;
}
}
}

Here i am getting the overlay the KS and the MaxHealth but not the Marker and FAL
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us