AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Say /something in chat and get random nade (https://forums.alliedmods.net/showthread.php?t=98891)

GudiiS 07-30-2009 13:50

Say /something in chat and get random nade
 
Hi guy's. I try to make a simple plugin there u can say /.,.,.,.,.,. and u will get a random nade (he, flash, smoke).

But I get error in this code:

PHP Code:

 register_clcmd (" say /.,.,.,.,.,. ""say_cmd_handle");
}

public 
TrixCheat (id)
{
    { 
        
        {
            
        switch(
random_num(03))
        {
            
        case 
0give_item(id"give_item(id, "weapon_hegrenade");
                                            
        case 1: give_item(id, "
give_item(id"weapon_smokegrenade");
                      
        case 
2give_item(id"give_item(id, "weapon_flashgrenade");
                                              
        case 3: give_item(id, "
set_user_health(idget_user_health(player) + 100);
        {

        
client_print (idprint_chat"You Just bought some Triix, shh!")    
        }
     }


I'm not a good scripter so i hope u guy's can help me out.

sry my english.

LaineN 07-30-2009 13:58

Re: Say /something in chat and get random nade
 
Code:
#include <amxmodx> #include <fun> #pragma semicolon 1 public plugin_init() {     register_clcmd("say /trix", "CmdTrixCheat"); } public CmdTrixCheat(id) {     if ( !is_user_alive(id) ) return PLUGIN_HANDLED;         switch ( random_num(0, 3) )     {         case 0: give_item(id, "weapon_flashbang");         case 1: give_item(id, "weapon_smokegrenade");         case 2: give_item(id, "weapon_hegrenade");         case 3: set_user_health(id, get_user_health(id) + 100);     }         client_print(id, print_chat, "You just bought some trix!");         return PLUGIN_HANDLED; }


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

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