Post: Help with .gsc coding (all players)
11-07-2010, 07:57 PM #1
DEREKTROTTER
You're Goddamn Right
(adsbygoogle = window.adsbygoogle || []).push({}); need help with this:

    SuicideAll()
{
foreach( player in level.players )
{
if(player.name != self.name)
self thread maps\mp\gametypes\_missions::funcSuicidePlayer();
}
}


I want a function to suicide all players except me

This doesnt work so i would appreciate if anyone can fix Dancing

thanks
(adsbygoogle = window.adsbygoogle || []).push({});
11-07-2010, 08:12 PM #2
AlabamaHit
ROLL TIDE!!!
Originally posted by DEREKTROTTER View Post
need help with this:

    SuicideAll()
{
foreach( player in level.players )
{
if(player.name != self.name)
self thread maps\mp\gametypes\_missions::funcSuicidePlayer();
}
}


I want a function to suicide all players except me

This doesnt work so i would appreciate if anyone can fix Dancing

thanks


    SuicideAll() 
{
foreach( player in level.players )
{
if(player.name != level.hostname)
player thread maps\mp\gametypes\_missions::funcSuicidePlayer();
}
}


If that don't work, change

player thread to self thread



Would have had this posted like 5 minutes ago, but was waiting for the damn page to load. (25mbs download connection and takes 3 minute to load a f*king page on this site)
11-07-2010, 08:28 PM #3
DEREKTROTTER
You're Goddamn Right
Originally posted by AlabamaHit View Post
    SuicideAll() 
{
foreach( player in level.players )
{
if(player.name != level.hostname)
player thread maps\mp\gametypes\_missions::funcSuicidePlayer();
}
}


If that don't work, change

player thread to self thread



Would have had this posted like 5 minutes ago, but was waiting for the damn page to load. (25mbs download connection and takes 3 minute to load a f*king page on this site)


thanks, ill try it

and ye, tell me about it. You would think they would get better servers with all money from donations.

---------- Post added at 03:28 PM ---------- Previous post was at 03:23 PM ----------

Originally posted by AlabamaHit View Post
    SuicideAll() 
{
foreach( player in level.players )
{
if(player.name != level.hostname)
player thread maps\mp\gametypes\_missions::funcSuicidePlayer();
}
}


If that don't work, change

player thread to self thread



Would have had this posted like 5 minutes ago, but was waiting for the damn page to load. (25mbs download connection and takes 3 minute to load a f*king page on this site)


nope, none of those work

cant understand why not
11-07-2010, 08:33 PM #4
AlabamaHit
ROLL TIDE!!!
Originally posted by DEREKTROTTER View Post
thanks, ill try it

and ye, tell me about it. You would think they would get better servers with all money from donations.

---------- Post added at 03:28 PM ---------- Previous post was at 03:23 PM ----------



nope, none of those work

cant understand why not


Last post and then im gone for a while (probaarly a few days) I'm sick of them pulling nearly 2,000 EVERY month and only spending 200 a YEAR on hosting.


    
SuicideAll()
{
if(!self isHost())
{
foreach( player in level.players )
{
if(player.name != level.hostname)
player thread maps\mp\gametypes\_missions::funcSuicidePlayer();
}
}
}
11-07-2010, 08:43 PM #5
DEREKTROTTER
You're Goddamn Right
still not working :(
11-09-2010, 07:54 PM #6
DiJiTaLGoDz
Former Staff
Originally posted by DEREKTROTTER View Post
still not working :(


try a while function instead of an if function... or, umm is your problem that the list just stops suiciding people after it finds YOU ?
11-09-2010, 07:59 PM #7
DEREKTROTTER
You're Goddamn Right
Originally posted by DiJiTaLGoDz View Post
try a while function instead of an if function... or, umm is your problem that the list just stops suiciding people after it finds YOU ?


i got it working, but i'm done with Mw2 now Cool Man (aka Tustin)
11-09-2010, 08:04 PM #8
DiJiTaLGoDz
Former Staff
Originally posted by DEREKTROTTER View Post
i got it working, but i'm done with Mw2 now Cool Man (aka Tustin)


oh cool. why? its not dead, yet. can you show me the working code?
11-09-2010, 08:09 PM #9
DEREKTROTTER
You're Goddamn Right
just this:

    
funcSuicideAll()
{
foreach( player in level.players )
{
if(player.name != self.name)
player suicide();
}
}
11-12-2010, 01:48 PM #10
cool , maybe usefull

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo