So after using it for a day I find if 2 players join while the game is going and then round ends and they join in it only gives 1 player the items and jug and just ignores the second player who also joined with them.
KillaG4
Posts
-
[Support] [GSC] Jug / Weapon script -
[Support] [GSC] Jug / Weapon script#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { level.clientid = 0; level.perk_purchase_limit = 9; level thread onplayerconnect(); } onplayerconnect() { for ( ;; ) { level waittill( "connecting", player ); player.clientid = level.clientid; player thread onplayerspawned(); level.clientid++; } } onplayerspawned() { level endon( "game_ended" ); self endon( "disconnect" ); for(;;) { self welcome(); } } welcome() { self IPrintLnBold( "^Killa Server" ); self waittill( "spawned_player" ); self maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest" ); self giveWeapon( "mp5k_upgraded_zm" ); wait 7; self iprintln("^2" +self.name + "^7 , your perk limit has been removed"); }
Ok i fixed it, I was calling
self waittill( "spawned_player" );
twice which was my issue. So if anyone is interested this will give Jug and a weapon and set perk limit to 9 -
[Support] [GSC] Jug / Weapon scriptAnyone know how to make it so the first person who joins the server gets the welcome function?? Works for anyone else who joins just not the first person.
-
[Support] [GSC] Jug / Weapon scripthmm I keep ending up adding it back I believe it causes issues if i dont keep it in both spots. Ill play around with it again tomorrow.
-
[Support] [GSC] Jug / Weapon scripthomura said in Jug / Weapon script:
#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { level.clientid = 0; level.perk_purchase_limit = 9; level thread onplayerconnect(); player thread onplayerspawned(); } onplayerconnect() { for ( ;; ) { level waittill( "connecting", player ); player.clientid = level.clientid; level.clientid++; player thread onplayerspawned(); } } onplayerspawned() { level endon( "game_ended" ); self endon( "disconnect" ); for(;;) { self waittill( "spawned_player" ); self IPrintLnBold( "^5whatever welcome message you want here" ); self welcome(); } } welcome() { self waittill( "spawned_player" ); self maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest" ); self giveWeapon( "mp5k_upgraded_zm" ); wait 7; self iprintln("^2" +self.name + "^7 , your perk limit has been removed"); }
It all works with this now, only issue now is the first person who joins the game doesnt get the gun. So once others start to join they all get the item and if the first player kills themselves then then get it
-
[Support] [GSC] Jug / Weapon scriptThis isnt crashing now but nothing happens when the game starts
#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { level thread onPlayerConnect(); level.perk_purchase_limit = 9; } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for(;;) { player thread welcome(); } } welcome() { self endon("disconnect"); self waittill("spawned_player"); self maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest" ); self giveWeapon( "ak74u_upgraded_zm" ); wait 7; self iprintln("^2" +self.name + "^7 , your perk limit has been removed"); }
-
[Support] [GSC] Jug / Weapon scriptNow the server is crashing over and over again on startup
-
[Support] [GSC] Jug / Weapon scriptYea Dont know what i had onplayerspawn multiple times this was the correct way i had it before I believe
#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { for(;;) { level thread onPlayerConnect(); level.perk_purchase_limit = 9; } } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { level endon("game_ended"); self endon("disconnect"); for(;;) { self waittill("spawned_player"); player thread welcome(); } } welcome() { self endon("disconnect"); self waittill("spawned_player"); self maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest" ); self giveWeapon( "ak74u_upgraded_zm" ); wait 7; self iprintln("^2" +self.name + "^7 , your perk limit has been removed"); }
-
[Support] [GSC] Jug / Weapon script#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { for(;;) { level thread onPlayerConnect(); player thread onPlayerSpawned(); } } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { level endon("game_ended"); self endon("disconnect"); for(;;) { self waittill("spawned_player"); player thread welcome(); level.perk_purchase_limit = 9; } } welcome() { self endon("disconnect"); self waittill("spawned_player"); self maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest" ); self giveWeapon( "ak74u_upgraded_zm" ); wait 7; self iprintln("^2" +self.name + "^7 , your perk limit has been removed"); }
Well if anyone wants to try to help off this feel free.
-
[Support] [GSC] Jug / Weapon scripthomura
I'm looking for someone to write it from scratch. My code is worthless as I don't know what I was doing just copying and pasting. If they want some kind of payment im even down. -
[Support] [GSC] Jug / Weapon scriptWell I don't really know what im doing so if someone knows how to do it I would greatly appreciate it
-
[Support] [GSC] Jug / Weapon scriptLooking for a simple script to give all users who join my zombie server Jugg and a gun i put in the code. I can only get it to give it to the first person who joins for some reason. Would love some help from someone who knows what they are doing.