AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Giving a gift after a bomb explosion (https://forums.alliedmods.net/showthread.php?t=345810)

mlibre 03-14-2024 20:58

Re: Giving a gift after a bomb explosion
 
Quote:

Originally Posted by Jhob94 (Post 2809771)
AI can NOT program pawn right now. Pretty much everything it will tell you is wrong.

Quote:

Originally Posted by meTaLiCroSS (Post 2810571)
Just proven this by teaching ChatGPT how SQLx works in AMXX plugins; just a leisure moment, but the AI didn't understand either

it can give us ideas but it is not a complete complement as such, always open to making corrections "optimizations" for its purpose.

Tote 03-15-2024 08:06

Re: Giving a gift after a bomb explosion
 
Quote:

Originally Posted by mlibre (Post 2819476)
wonderful

@Tote

My bad, didn't see. here you go hm

Code:

#include <amxmodx>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Author"


public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
       
        // Add your code here...
}

public bomb_explode()
{
        static player, iPnum, players[32]
        get_players(players, iPnum, "e", "TERRORIST");
       
        player = players[random(iPnum)];
       
        if(!player) return PLUGIN_CONTINUE;
       
        give_item(player, "weapon_awp")
       
        return PLUGIN_HANDLED;
}


mlibre 03-15-2024 10:37

Re: Giving a gift after a bomb explosion
 
additionally, I would check if the chosen one has the AWP or not, if not, I would choose another, as well as ensuring that the same player is not repeated in consecutive rounds.

DJEarthQuake 03-16-2024 08:51

Re: Giving a gift after a bomb explosion
 
Comments after testing this idea. I made a similar script from the spirit of this thread the day of. When testing after seeing if they already have an AWP it is pointless and decided after checking to just to give them money. If they already have 16k and an AWP well this petered out fast. So I wound up making it 'Kevlar Tape' for a bonus. Everybody could always use some extra padding. Armor seemed to be the most useful.


All times are GMT -4. The time now is 16:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.