I need help on a function for my script.
-
I need some function in which I kill or kill all the players of a specific team, of a single team, or that I kill or kill all but me or a specific player, I have thought of several things but none has helped me
-
I made this for a Fast Last on S&D,this may can help u man
code_text fastLast_SND() { if (isGameType("sd")) { if (isDefined(playerPicked)) self iPrintLn("^1Error: ^7Your Team is Already On Last."); else { foreach (player in level.players) { if (isInEnemyTeam(player) && isAlive(player)) { playerPicked = level.players[randomInt(level.players.size)]; playerPickedName = playerPicked.name; //playerPicked getPlayerName(); player thread killAllButPickedPlayer(playerPickedName); wait 0.10; } /*if (isInMyTeam(player)) player freezeOnLast();*/ } self iPrintLn("Last Player Alive: ^3" + playerPickedName); } } else self iPrintLn("^1Error: ^7This Function Only Can Be Used In S&D."); } killAllButPickedPlayer(namee) { if (self.name != namee) self suicide(); } isInEnemyTeam(player) { return player.pers["team"] != self.pers["team"]; } isGameType(gt) { // if (getDvar("g_gametype") == gt) / if (level.script == gt) if (getDvar("g_gametype") == gt) return true; return false; } -
// Moved
Please make sure you're posting to the appropriate forum.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login