Garry's Mod

Garry's Mod

[E2] PlyCore
 This topic has been pinned, so it's probably important
Sir Papate  [developer] 13 Jan, 2014 @ 5:39pm
Suggestion box!
If you have any suggestions of commands or of project, write down!
Last edited by Sir Papate; 13 Jan, 2014 @ 6:32pm
< >
Showing 1-15 of 24 comments
[SUAFT] Chammy 13 Jun, 2014 @ 11:48pm 
You have a function for forcing a player to spawn, perhaps you could have a function similar to runOnTick(), but be runOnSpawn(E), where E is a player entity? Then it would run the expression every time that player respawns.

If this is possible, respawnClk() may also be an ideal function, for returning 1 when the exrpession is triggered by a respawn.
Sir Papate  [developer] 17 Jun, 2014 @ 7:32pm 
I'm going to work, it should be done in a few days.

You can use this code to do it:
@persist LastPlySpawn:entity [AliveD LastAliveTick]:array runOnTick(1) function number spawnClk(){ foreach( I, Ply:entity = players() ){ AliveD[I,number] = LastAliveTick[I,number] - Ply:isAlive() LastAliveTick[I,number] = Ply:isAlive() if( Ply:isAlive() & AliveD[I,number] & !first() ){ LastPlySpawn = Ply return 1 } } return 0 } function entity lastSpawn(){ return LastPlySpawn } ##Example if( spawnClk() ){ if( lastSpawn() == owner() ){ owner():plySetSpeed( 500 ) } }
Last edited by Sir Papate; 17 Jun, 2014 @ 7:37pm
[SUAFT] Chammy 17 Jun, 2014 @ 10:01pm 
Awesome! Glad you saw my comment, and thanks for the response! I look forward eagerly to the update! Modders like you rock.
Sir Papate  [developer] 23 Jun, 2014 @ 8:18am 
it's done!
[SUAFT] Chammy 23 Jun, 2014 @ 11:32am 
Awesome! I'm sure I'll be on Gmod at some point today, if anything goes wrong, I'll let you know! Thanks for the quick and excellent work!
zamboni 20 Jul, 2014 @ 5:41pm 
Could you possibly create a function that will nocollide the player with a specified entity? For instance, I have a forcefield E2, and currently the way it's set up is it toggles the solid state of the prop, which allows other people through if someone on the whitelist is close enough.

I just need something like E:plyNoCollide() where in the parentheses I could maybe reference a table of steamIDs

My example:
if(Pos <=80 & T[Targ:team():teamName(),number] == 1){
entity():isWeldedTo():plyNoCollide(Target)
}

that's obviously not the entire E2, but the basic use of it.

Sorry if I didn't explain it very well.
Last edited by zamboni; 20 Jul, 2014 @ 5:44pm
bigdogmat 5 Nov, 2015 @ 11:31pm 
Remove the has access checks from functions such as plyInGod, mainly because their's no reason to have it on such functions and they'll just return an invalid result.
OUIIJM GUIITPS 13 Jan, 2016 @ 12:56pm 
What about a plyInNoclip
returns 1 if the player is in noclip mode
bigdogmat 14 Jan, 2016 @ 6:11am 
InNoclip is already in default E2
OUIIJM GUIITPS 14 Jan, 2016 @ 11:58am 
derp
paul_rose 25 Jul, 2019 @ 8:32am 
hey @Sir Papate is it possible to add plyStrip() to stip all a players weapons please?

this can be done without it but its a serious job to do so and its a lot of hastle to get it working so i thaught maybe asking u to make a function for that so it would be a lot easier
Sir Papate  [developer] 28 Jul, 2019 @ 11:26am 
Originally posted by ๖ۣۜpaul_rose:
hey @Sir Papate is it possible to add plyStrip() to stip all a players weapons please?

this can be done without it but its a serious job to do so and its a lot of hastle to get it working so i thaught maybe asking u to make a function for that so it would be a lot easier

Thanks for your suggestion, but this function is already available in the WeaponCore with E:plyStripWeapons()
paul_rose 28 Jul, 2019 @ 11:34am 
thankyou =) i diddnt realise there was a core for weapons, il be sure to try it!
Sanders 28 Jul, 2019 @ 2:00pm 
Originally posted by ๖ۣۜpaul_rose:
thankyou =) i diddnt realise there was a core for weapons, il be sure to try it!

it works well i use it in a server (making a safespace kind of thing)
add a function plyCanNoclip() "number=entity:PlyCanNoclip()" (checks if the player can noclip using the noclip bind not ulx)
< >
Showing 1-15 of 24 comments
Per page: 1530 50