Zplague
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Zplague Entrar

Seu portal de Zombie Plague no Brasil


descriptionComércio [DeathRun] EmptyComércio [DeathRun]

more_horiz
Comércio [DeathRun] Deathrun_ympu_v30002
Plugin que eu tinha feito em meados de 2009
espero que sirva em algo para alguns ...

Código:

#include <amxmodx>
#include <fakemeta_util>
#include <cstrike>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>

new Float:g_spawns[33][3], Float:g_angles[33][3]

#define PLUGIN   "Comercio"
#define AUTHOR   "Junin (jr_acn)"
#define VERSION   "1.1"

#define MOTD_FILE "creditos.txt"


new preco_speed
new preco_grav
new preco_glow
new preco_sort
new preco_invis
new preco_kit
new preco_bunny
new preco_dea
new preco_lj
new preco_gl
new tempo_bunny
new gMsgItemPickup;
new g_msgSayText;

new g_maxplayers
const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0
new bool:g_has_velocidade[33]
new bool:g_has_grav[33]
new bool:g_has_glow[33]
new bool:g_has_sort[33]
new bool:g_has_invis[33]
new HasLongJump[ 33 ];
new bool:g_has_bunny[33]
new g_isalive[33]


enum
{
FM_CS_TEAM_UNASSIGNED = 0,
FM_CS_TEAM_T,
FM_CS_TEAM_CT,
FM_CS_TEAM_SPECTATOR
}

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
// Event
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_forward( FM_PlayerPreThink, "forward_prethink" )
register_menu("Menu Radio", KEYSMENU, "menu_radio")
preco_speed = register_cvar("comercio_speed_preco","8000");
preco_grav = register_cvar("comercio_grav_preco","1000");
preco_glow = register_cvar("comercio_glow_preco","500");
preco_sort = register_cvar("comercio_sort_preco","6000");
preco_invis = register_cvar("comercio_invis_preco","16000");
preco_bunny = register_cvar("comercio_bunny_preco","2000");
tempo_bunny = register_cvar("comercio_bunny_um_round","0");
preco_kit = register_cvar("comercio_kit_granadas_preco","200");
preco_dea = register_cvar("comercio_deagle_preco","100");
preco_lj = register_cvar("comercio_lj_preco","300");
preco_gl = register_cvar("comercio_gl_preco","700");

register_clcmd("creditos", "ShowMotD");
register_clcmd("ajuda_deathrun", "ajuda"); //radio
register_clcmd("say /radio", "radio")
register_clcmd("comandos", "comando")
register_clcmd("todos", "todos")

register_menu("Game Menu", KEYSMENU, "menu_game")
gMsgItemPickup = get_user_msgid( "ItemPickup" )
g_msgSayText = get_user_msgid("SayText")

register_event("CurWeapon","Change_Gun","be","1=1")

// Get Max Players
g_maxplayers = get_maxplayers()


}
public plugin_cfg()
{
// Config
new cfgdirecction[32]
get_configsdir(cfgdirecction, sizeof cfgdirecction - 1);

// Carregar Config (comercio_cvars.cfg)
server_cmd("exec %s/comercio_cvars.cfg", cfgdirecction)
}
public todos(id)
{
  for (new id; id <= g_maxplayers; id++)
   {
fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
g_has_invis[id] = true
      }
}
public comando(id)
{

   show_menu_game(id)
   
   return PLUGIN_HANDLED;
}
public client_putinserver(id)
{   
        client_cmd(0,"rate 25000")
        client_cmd(0,"cl_updaterate 101")
        client_cmd(0,"cl_cmdrate 101")

   set_task(15.0, "mensagem", id)  //Caso queira mudar Troque o 15 por outro numero
   client_cmd(0,"bind p comandos")
}
public mensagem(id)
{
   zp_colored_print(id,"^x04 [AnthRax] Servidor Utilizando Plugin Comercio v1.1^x01")
   client_cmd(0,"bind P comandos")
   zp_colored_print(id,"^x04 Aperte a tecla [P] para abrir o menu do plugin.^x01")
   set_task(150.0, "mensagem", id)  //Tempo que a mensagem ira reaparecer
}
public comercio_menu(id)
{   
   
   /* --| Menu stuff */
   new szText[ 555 char ];
   formatex( szText, charsmax( szText ), "\r[Items Comercio] \y^nSeu dinheiro: %d^n", cs_get_user_money( id ) );
   
   new menu = menu_create( szText, "mostrar_cliente" );
   
   
   /* --| Menu item 2 */
   formatex( szText, charsmax( szText ), "Velocidade $ %d", get_pcvar_num(preco_speed ) );
   menu_additem( menu, szText, "2", 0 );
   
   /* --| Menu item 3 */
   formatex( szText, charsmax( szText ), "Gravidade $ %d",get_pcvar_num( preco_grav ) );
   menu_additem( menu, szText, "3", 0 );
   
   /* --| Menu item 4 */
   formatex( szText, charsmax( szText ), "Glow $ %d", get_pcvar_num( preco_glow) );
   menu_additem( menu, szText, "4", 0 );
   
   /* --| Menu item 5 */
   formatex( szText, charsmax( szText ), "Sorting $ %d", get_pcvar_num(preco_sort ) );
   menu_additem( menu, szText, "5", 0 );
   
   /* --| Menu item 6 */
   formatex( szText, charsmax( szText ), "Invisibilidade $ %d", get_pcvar_num( preco_invis ) );
   menu_additem( menu, szText, "6", 0 );
   
   /* --| Menu item 7 */
   formatex( szText, charsmax( szText ), "Bunny Hop $ %d", get_pcvar_num( preco_bunny) );
   menu_additem( menu, szText, "7", 0 );
   
   /* --| Menu item 8 */
   formatex( szText, charsmax( szText ), "Kit Granadas $ %d", get_pcvar_num(preco_kit ) );
   menu_additem( menu, szText, "8", 0 );
   
   /* --| Menu item 9 */
   formatex( szText, charsmax( szText ), "Deagle $ %d", get_pcvar_num( preco_dea));
   menu_additem( menu, szText, "9", 0 );
   
   /* --| Menu item 10 */
   formatex( szText, charsmax( szText ), "Long Jump $ %d", get_pcvar_num(preco_lj) );
   menu_additem( menu, szText, "10", 0 );
   
   
   menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
   
   /* --| Show the menu, with current page 0 */
   menu_display( id, menu, 0 );
   
   return PLUGIN_CONTINUE;
}
public mostrar_cliente( id, menu, item)
{
   
   if( item == MENU_EXIT )
   {
      menu_destroy( menu );
      return PLUGIN_HANDLED;
   }
   new data[ 6 ], iName[ 64 ], access, callback;
   menu_item_getinfo( menu, item, access, data, charsmax( data ), iName, charsmax( iName ), callback );
   
   
   new key = str_to_num( data );
   
   new money = cs_get_user_money(id)
   
   switch(key)
   {
      case 2:
      {
         if(g_has_velocidade[id])
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce so pode comprar uma vez.");
            return PLUGIN_HANDLED;
         }
         if( is_user_alive(id) )
         {
            if ( money < get_pcvar_num(preco_speed) ) {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }         
            set_pev(id, pev_maxspeed, 345.0)
            cs_set_user_money(id, money - get_pcvar_num(preco_speed) );
            zp_colored_print(id, "^x04[Comercio]^x01 Voce Comprou Velocidade.");
            client_cmd(id,"speak buttons/bell1.wav")
            g_has_velocidade[id] = true         
            return PLUGIN_HANDLED
         }
         if(!is_user_alive(id))
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
            return PLUGIN_HANDLED;
         }
      }
      case 3:
      {
         if( is_user_alive(id) )
         {
            if(g_has_grav[id])
            {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce so pode comprar uma vez.");
               return PLUGIN_HANDLED;
            }
            if ( money < get_pcvar_num(preco_grav) ) {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }         
            fm_set_user_gravity(id,0.7)             
            zp_colored_print(id, "^x04[Comercio]^x01 Voce comprou Gravidade.");
            cs_set_user_money(id, money - get_pcvar_num(preco_grav) );
            client_cmd(id,"speak buttons/bell1.wav")
            g_has_grav[id] = true
            
            
            return PLUGIN_HANDLED
         }
         if(!is_user_alive(id))
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
            return PLUGIN_HANDLED;
         }
         
      }
      case 4:
      {
         if( is_user_alive(id) ){
            if(g_has_glow[id])
            {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce so pode comprar uma vez.");
               return PLUGIN_HANDLED;
            }
            if ( money < get_pcvar_num(preco_glow) ) {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }         
            fm_set_rendering(id, kRenderFxGlowShell, 150, 150, 255, kRenderNormal, 20)
            zp_colored_print(id, "^x04[Comercio]^x01 voce comprou Glow.");
            cs_set_user_money(id, money - get_pcvar_num(preco_glow) );
            client_cmd(id,"speak buttons/bell1.wav")
            g_has_glow[id] = true
            
            
            return PLUGIN_HANDLED
         }
         if(!is_user_alive(id))
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
            return PLUGIN_HANDLED;
         }
         
      }
      case 5:
      {
         if(g_has_sort[id])
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce so pode comprar uma vez.");
            return PLUGIN_HANDLED;
         }
         if( is_user_alive(id) )
         {
            if ( money < get_pcvar_num(preco_sort) ) {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }
            if(!is_user_alive(id))
            {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
               return PLUGIN_HANDLED;
            }      
            switch (random_num(1, 6))
            {
               case 1:{
                  fm_set_rendering(id, kRenderFxGlowShell, 150, 150, 255, kRenderNormal, 20)
                  zp_colored_print(id, "^x04[Comercio]^x01 Voce Ganhou Glow.")
                  cs_set_user_money(id, money - get_pcvar_num(preco_sort) );
                  client_cmd(id,"speak buttons/bell1.wav")
                  g_has_sort[id] = true
                  return PLUGIN_HANDLED
               }
               case 2:{
                  cs_set_user_money(id,16000 );
                  zp_colored_print(id, "^x04[Comercio]^x01 Voce Ganhou 16000.")
                  client_cmd(id,"speak buttons/bell1.wav")
                  g_has_sort[id] = true
                  
               }
               case 3:{
                  
                  user_silentkill(id)
                  cs_set_user_money(id, money - get_pcvar_num(preco_sort) );
                  zp_colored_print(id, "^x04[Comercio]^x01 Veneno kkkkkk.")
                  client_cmd(id,"speak aslave/slv_die1.wav")
                  
                  g_has_sort[id] = true
                  
               }
               case 4:{
                  fm_set_user_gravity(id,0.8)
                  cs_set_user_money(id, money - get_pcvar_num(preco_sort) );
                  set_pev(id, pev_maxspeed, 325.0)
                  zp_colored_print(id, "^x04[Comercio]^x01 Voce Ganhou Gravidade + Speed.")
                  client_cmd(id,"speak buttons/bell1.wav")
                  g_has_sort[id] = true
               }
               case 5:{
                  
                  fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
                  zp_colored_print(id, "^x04[Comercio]^x01 Invisibilidade.")
                  client_cmd(id,"speak buttons/bell1.wav")
                  cs_set_user_money(id, money - get_pcvar_num(preco_sort) );
                  g_has_sort[id] = true
                  
               }
               case 6:{
                  
                  zp_colored_print(id, "^x04[Comercio]^x01 Grana Roubada.")
                  client_cmd(id,"speak buttons/bell1.wav")
                  cs_set_user_money(id, 0);
                  g_has_sort[id] = true
                  
               }
            }
         }
      }
      case 6:
      {
         if(g_has_invis[id])
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce so pode comprar uma vez.");
            return PLUGIN_HANDLED;
         }
         if( is_user_alive(id) )
         {
            if ( money < get_pcvar_num(preco_invis) ) {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }         
            fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
            cs_set_user_money(id, money - get_pcvar_num(preco_invis) );
            zp_colored_print(id, "^x04[Comercio]^x01 Voce esta invisivel.");
            g_has_invis[id] = true
            
            
            return PLUGIN_HANDLED
         }
         if(!is_user_alive(id))
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
            return PLUGIN_HANDLED;
         }
      }
      case 7:
      {
         if(g_has_bunny[id])
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce so pode comprar uma vez.");
            return PLUGIN_HANDLED;
         }
         if( is_user_alive(id) )
         {
            if ( money < get_pcvar_num(preco_bunny) ) {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }         
            cs_set_user_money(id, money - get_pcvar_num(preco_bunny) );
            g_has_bunny[id] = true
            client_cmd(id,"speak buttons/bell1.wav")
            zp_colored_print(id, "^x04[Comercio]^x01 Voce Comprou Bunny Hop.");
            
            return PLUGIN_HANDLED
         }
         if(!is_user_alive(id))
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
            return PLUGIN_HANDLED;
         }
      }
      case 8:
      {
         
         if( is_user_alive(id) )
         {
            if ( money < get_pcvar_num(preco_kit) ) {
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }         
            cs_set_user_money(id, money - get_pcvar_num(preco_kit) );
            fm_give_item(id,"weapon_hegrenade")   
            zp_colored_print(id, "^x04[Comercio]^x01 Voce Comprou HE + 2 FLASH.");
            fm_give_item(id,"weapon_flashbang")   
            fm_give_item(id,"weapon_flashbang")
            client_cmd(id,"speak buttons/bell1.wav")
            
            return PLUGIN_HANDLED
         }
         if(!is_user_alive(id))
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
            return PLUGIN_HANDLED;
         }
         
         
         
         return PLUGIN_HANDLED
      }
      case 9:
      {
         
         if( is_user_alive(id) )
         {
            if ( money < get_pcvar_num(preco_dea) ){
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }         
            cs_set_user_money(id, money - get_pcvar_num(preco_dea) );
            zp_colored_print(id, "^x04[Comercio]^x01 Voce Comprou Deagle.");
            client_cmd(id,"speak buttons/bell1.wav")
            fm_give_item(id,"weapon_deagle")   
            
            return PLUGIN_HANDLED
         }
         if(!is_user_alive(id))
         {
            zp_colored_print(id, "^x04[Comercio]^x01 Voce precisa estar^x04 vivo.");
            return PLUGIN_HANDLED;
         }
         
         
         
         return PLUGIN_HANDLED
      }   
      case 10:
      {
         if( is_user_alive(id) )
         {
            if ( money < get_pcvar_num(preco_lj) ){
               zp_colored_print(id, "^x04[Comercio]^x01 Voce nao tem^x04 dinheiro^x01 suficiente.");
               return PLUGIN_HANDLED;
            }   
            zp_colored_print(id, "^x04[Comercio]^x01 Voce Comprou Long Jump (200 Segundos). Aperte ( CTRL + ESPACO)");
            set_temporary_longjump(id);
            client_cmd(id,"speak buttons/bell1.wav")   
            HasLongJump[ id ] = true;
            cs_set_user_money(id, money - get_pcvar_num(preco_lj) );
            emit_sound( id, CHAN_ITEM, "items\guncock1.wav", VOL_NORM , ATTN_NORM , 0 , PITCH_NORM );
         }
         
      }
   }
}

public event_round_start()
{
   set_hudmessage(85, 127, 255, -1.0, -1.0, 1, 2.0, 5.0)
   show_hudmessage(0, "Play Hard, Go Pro ")
   
   for (new id; id <= g_maxplayers; id++)
   {   
      client_cmd(id,"bind space +jump") //EVITA JOGADORES USAREM
      g_has_velocidade[id] = false;    //SCRIPT PARA NAO COMPRAREM BUNNY HOP
      g_has_grav[id] = false;
      g_has_glow[id] = false;
      g_has_sort[id] = false;
      HasLongJump[ id ] = false;
      g_has_invis[id] = false;
   
      fm_set_rendering(id, kRenderFxNone, 0,0,0,kRenderNormal, 255)
      client_cmd(id,"cl_forwardspeed 1000")
      client_cmd(id,"cl_sidespeed 1000") //Evita bug de nao Andar em diagonal
      client_cmd(id,"cl_backspeed 1000")
      if(get_pcvar_num(tempo_bunny) == 1)
      {
         g_has_bunny[id] = false;
      }
      
      server_cmd("sv_maxspeed 99900")
      
   }
}


// Game Menu
show_menu_game(id)
{
static menu[250], len
len = 0

// Title
len += formatex(menu[len], charsmax(menu) - len, "\rAnthRax 4Fun^n\d[Versao 1.0]^n^n")

// 1. Comercio DeathRun
if(is_user_alive(id))
   len += formatex(menu[len], charsmax(menu) - len, "\r1.\w Comercio^n", id)
   else
      len += formatex(menu[len], charsmax(menu) - len, "\r1.\d Comercio^n", id)
   
   // 2. Time
   len += formatex(menu[len], charsmax(menu) - len, "\r2.\w Passar para Espectador^n", id)
   
   // 2. Desbugar
   if(is_player_stuck(id))
      len += formatex(menu[len], charsmax(menu) - len, "\r3.\w Desbugar^n", id)
   else
      len += formatex(menu[len], charsmax(menu) - len, "\r3.\d Desbugar^n", id)
   
   // 3. Site
   len += formatex(menu[len], charsmax(menu) - len, "\r4.\w Download do Addon^n", id)
   
   // 5. Administracao
   len += formatex(menu[len], charsmax(menu) - len, "\r5.\w Administracao^n", id)
   
   // 6. Descricao
   len += formatex(menu[len], charsmax(menu) - len, "\r6.\w Ajuda^n", id)
   
   
   // 0. Exit
   len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0.\w Sair", id, "MENU_EXIT")
   
   show_menu(id, KEYSMENU, menu, -1, "Game Menu")
}
// Game Menu
public menu_game(id, key)
{
   
   switch (key)
   {
      case 0:
      {
         if(is_user_alive(id))
            comercio_menu(id)
         else
         {
            zp_colored_print(id,"^x04[Comercio]^x01 Voce Esta Morto ! ")
            return
         }
      }
      case 1: // Time
      {
         zp_colored_print(id,"^x04[Comercio]^x01 Aperte Novamente [M]^x04 para voltar a Jogar ! ")
         dllfunc(DLLFunc_ClientKill, id)
         cs_set_user_team(id, FM_CS_TEAM_SPECTATOR)
         
      }
      case 2: //Desbugar
      {
         if(is_player_stuck(id))
         {
            if(is_user_alive(id)){   
               set_task(0.7, "desbugar",id);
               client_cmd(id,"speak ambience/biotone.wav");
               zp_colored_print(id,"^x04[Comercio]^x01 Aguarde um momento...");
               return
            }
         }
         else
            zp_colored_print(id,"^x04[Comercio]^x01 Voce Nao esta Bugado!", id)
      }
      case 3: // Creditos
      {
         client_cmd(id,"creditos")
      }
      
      case 4: // Menu AMXX
      {
         client_cmd(id,"amxmodmenu")
      }
      case 5: //Descricao do MOD
      {
         client_cmd(id,"ajuda_deathrun")
      }
   }
}
///////
public ShowMotD(Client)
   show_motd(Client, MOTD_FILE);
//////
public forward_prethink( id )
{
   if( !is_user_alive( id ) || !g_has_bunny[ id ] ) return;
   
   set_pev( id, pev_fuser2, 0.0 )
   
   if( pev( id, pev_button ) & IN_JUMP )
   {
      new szFlags = pev( id, pev_flags )
      if( !( szFlags & FL_WATERJUMP ) && pev( id, pev_waterlevel ) < 2 && szFlags & FL_ONGROUND )
      {
         new Float: szVelocity[ 3 ]
         pev( id, pev_velocity, szVelocity)
         szVelocity[ 2 ] += 250.0
         set_pev( id, pev_velocity, szVelocity )
         set_pev( id, pev_gaitsequence, 6 )
      }
   }
}

public Change_Gun(id)
{
   if(g_has_velocidade[id])
   {
      fm_set_user_maxspeed(id,365.0)
   }
   
   return PLUGIN_CONTINUE
}


stock set_temporary_longjump( index )
{
   message_begin( MSG_ONE_UNRELIABLE, gMsgItemPickup, _, index );
   write_string( "item_longjump" );
   message_end();
   
   engfunc( EngFunc_SetPhysicsKeyValue, index, "slj", "1" );
   
   set_task(200.0, "remove_lj", index)
}
public remove_lj( index )
{
   HasLongJump[ index ] = false;
   engfunc( EngFunc_SetPhysicsKeyValue, index, "slj", "0" );
   zp_colored_print(index,"^x04[Comercio]^x01 Acabou o Long Jump")
}

//
//
//
stock zp_colored_print(target, const message[], any:...)
{
   static buffer[512], i, argscount
   argscount = numargs()
   
   // Send to everyone
   if (!target)
   {
      static player
      for (player = 1; player <= g_maxplayers; player++)
      {
         
         // Remember changed arguments
         static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
         changedcount = 0
         
         // Replace LANG_PLAYER with player id
         for (i = 2; i < argscount; i++)
         {
            if (getarg(i) == LANG_PLAYER)
            {
               setarg(i, 0, player)
               changed[changedcount] = i
               changedcount++
            }
         }
         
         // Format message for player
         vformat(buffer, charsmax(buffer), message, 3)
         
         // Send it
         message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
         write_byte(player)
         write_string(buffer)
         message_end()
         
         // Replace back player id's with LANG_PLAYER
         for (i = 0; i < changedcount; i++)
            setarg(changed[i], 0, LANG_PLAYER)
      }
   }
   // Send to specific target
   else
   {
      /*
      // Not needed since you should set the ML argument
      // to the player's id for a targeted print message
      
      // Replace LANG_PLAYER with player id
      for (i = 2; i < argscount; i++)
      {
         if (getarg(i) == LANG_PLAYER)
            setarg(i, 0, target)
      }
      */
      
      // Format message for player
      vformat(buffer, charsmax(buffer), message, 3)
      
      // Send it
      message_begin(MSG_ONE, g_msgSayText, _, target)
      write_byte(target)
      write_string(buffer)
      message_end()
   }
}
public desbugar( id )
{
   if(is_user_alive(id)){
      teleport_player(id)
      client_cmd(id,"stopsound")
      zp_colored_print(id,"^x04[Comercio]^x01 Voce foi destravado", id)
      
      return PLUGIN_HANDLED
   }
}
stock is_player_stuck(id)
{
   static Float:originF[3]
   pev(id, pev_origin, originF)
   
   engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0)
   
   if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
      return true;
   
   return false;
}
public fw_PlayerSpawn(id)
{
   if (!is_user_alive(id))
      return HAM_IGNORED
   
   pev(id, pev_origin, g_spawns[id])
   pev(id, pev_angles, g_angles[id])
   
   
   return HAM_IGNORED
}
stock teleport_player(id)
{
   
   set_pev(id,pev_origin, g_spawns[id])
   set_pev(id, pev_angles, g_angles[id])
   
   message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
   write_byte(TE_TELEPORT)
   engfunc(EngFunc_WriteCoord, g_spawns[id][0])
   engfunc(EngFunc_WriteCoord, g_spawns[id][1])
   engfunc(EngFunc_WriteCoord, g_spawns[id][2])
   message_end()
}
public ajuda(id, key)
{
   static motd[1500], len
   len = 0
   
   len += formatex(motd[len], charsmax(motd) - len, "http://i50.tinypic.com/2w350mb.jpg:", id)
   
   
   show_motd(id, motd)
}
public radio(id)
{
   static menu[250], len
   len = 0
   
   // Title
   len += formatex(menu[len], sizeof menu - 1 - len, "\rRadio\y1.0^n", id)
   
   len += formatex(menu[len], sizeof menu - 1 - len, "\r1. \wProgramacao 1^n", id)
   len += formatex(menu[len], sizeof menu - 1 - len, "\r2. \wProgramacao 2^n", id)
   len += formatex(menu[len], sizeof menu - 1 - len, "\r3. \wJovem Pan^n", id)
   len += formatex(menu[len], sizeof menu - 1 - len, "\r4. \wMetropolitana^n", id)
   len += formatex(menu[len], sizeof menu - 1 - len, "\r5. \wTransamerica^n", id)
   len += formatex(menu[len], sizeof menu - 1 - len, "\r6. \w89^n", id)
   len += formatex(menu[len], sizeof menu - 1 - len, "\r7. \wParar^n", id)
   
   show_menu(id, KEYSMENU, menu, -1, "Menu Radio")
}
public menu_radio(id, key)
{
   static motd[1500], len
   len = 0
   
   switch (key)
   {
      case 0:
      {
         len += formatex(motd[len], charsmax(motd) - len, "http://bit.ly/ah6uVl", id)
         show_motd(id, motd)
      }
      case 1:
      {
         len += formatex(motd[len], charsmax(motd) - len, "http://bit.ly/brwdYw", id)
         show_motd(id, motd)   
      }
      case 2:
      {
         len += formatex(motd[len], charsmax(motd) - len, "http://bit.ly/yjurs", id)   
         show_motd(id, motd)   
      }
      case 3:
      {
         len += formatex(motd[len], charsmax(motd) - len, "http://metropolitanafm.uol.com.br/ao-vivo/", id)   
         show_motd(id, motd)   
      }
      case 4:
      {
         len += formatex(motd[len], charsmax(motd) - len, "http://transanet.telium.com.br/player.php", id)   
         show_motd(id, motd)   
      }
      case 5:
      {
         len += formatex(motd[len], charsmax(motd) - len, "http://www.89fm.com.br/", id)
         show_motd(id, motd)   
      }
      case 6:
      {
         len += formatex(motd[len], charsmax(motd) - len, "Sem Radio =)", id)
         show_motd(id, motd)   
      }
   }
}

descriptionComércio [DeathRun] EmptyRe: Comércio [DeathRun]

more_horiz
Vlllllwwwwww junin :)
privacy_tip Permissões neste sub-fórum
Não podes responder a tópicos
power_settings_newInicie sessão para responder