Krazi
Users-
Content Count
12 -
Donations
0.00 EUR -
Joined
-
Last visited
About Krazi
-
Rank
Beginner
-
Okay. I just wanted to learn these things. lol
-
I've checked the whole think several times, and there's not mistakes in semi-colons.
-
When I use self waittill("player_spawn");, my server crashes.
-
OH! Maybe it's because it keeps looping and doesn't endon("death"); lol.. Thanks, I'll try this one out. ~EDIT~ Okay, so when I do this: onPlayerSpawn() { for(; { self endon("disconnect"); level waittill("spawn_player", player); player takeAllWeapons(); player giveWeapon("colt44_mp"); player giveMaxAmmo("colt44_mp"); player switchToWeapon("colt44_mp"); } } Nothing happens, and when I do this: onPlayerSpawn() { for(; { self endon("disconnect"); self waittill("spawned_player"); self takeAllWeapons(); self giveWeapon("colt44_mp"); self giveMaxAmmo("colt44_mp"); self switchToWeapon("colt44_mp"); } } My server crashes. ~EDIT 2~ Also, is it self waittill("spawned_player"); or self waittill("spawn_player");
-
I supplied one patch of code, I've defined the player in: level waittill("player_spawn", player); Is this not correct? EDIT: As I'm new to this coding language and I want to progress, I have one question which is probably self-explanatory. But self endon("disconnect"); waits for the server to disconnect or player, and why put self there? Sorry if this questions is stupid..
-
Ahhh, level.player. I was doing if(player hasWeapon( "" ){} I'll try it out! EDIT: In free-mode when they respawn, the weapon disappears, I wanted it to spawn everytime. I have NO clue how to do this now, I don't even know if it's possible anymore.
-
It's just my own plugin I made.
-
I have deathrun, not ghostrun..?
-
Hi Krazi, theres something inside _mod.gsc, search for this (not on MakeMeHuman()): self giveWeapon( self.pers["weapon"] ); There you will see some code lines, in my mod I want everybody to have their selected weapon and as a secondary, to have a knife, this is my code: self giveWeapon( self.pers["weapon"] ); self setSpawnWeapon( self.pers["weapon"] ); self giveWeapon( "knife_mp" ); self giveMaxAmmo( self.pers["weapon"] ); So in your case, you will need to delete that "self.pers["weapon"]" and replace it with the weapon name, use a format like this: self giveWeapon( "name of your weapon" ); self giveMaxAmmo( "name of your weapon" ); So no need of creating unnecessary plugins and with the plugin you wanted to do, everytime someone gets that weapon, it will be replaced with the one you want, means you will only have one gun. Okay, so I've done that but i'm trying to make it where when the player dies and respawns, his weapons are givin back. The ones I set anyway.
-
Okay, it's Krazi again! So I'm trying to make a plugin that spawns the player a weapon, I've got that down but I want to be able to detect the current user's weapon and replace it with the one I want them to have. Like this: if(!player hasWeapon(weapon)) { player giveWeapon(weapon); player giveMaxAmmo(weapon); player switchToWeapon(weapon); } Any ideas? Thanks. Best regards, Krazi.
-
Hi, so I'm trying to script my own DR plugin and this is what I have so far: init( modVersion ) { precacheItem( "colt44_mp" ); thread onPlayerSpawn(); } onPlayerSpawn() { for(; { level waittill( "player_spawn", player ); player iprintln("^1IS THIS WORKING??????"); } } I'm using NFOServers to host my CoD4 DR server and I'm trying to figure out what the f*** is wrong this this, I try to launch the server and it crashes or something. Please help me! Best regards, Krazi. NOTE: Nevermind, I've fixed it.. Simple issue with renaming the file, etc.. Thanks for this thread though!