Cerere Teleport Buy

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Paul-Andrei
Membru, skill 0
Membru, skill 0
Posts: 63
Joined: 05 Jul 2011, 20:54
Detinator Steam: Da
CS Status: Putin nu mult.
Detinator server CS: Zombie.XtremeXPC.Ro
SteamID: private
Location: Bucuresti
Has thanked: 9 times
Been thanked: 2 times
Contact:

10 Jul 2012, 15:50

As dori daca se poate sa imi faceti acest plugin (de mai jos) in asa fel incat sa il poti cumpara prin comanda /teleport sa coste 10000..si sa fie doar o runda.

Code: Select all

#include < amxmodx >
#include < fakemeta > 
#include < xs > 

#define PLUGIN "Teleport"
#define VERSION "1.0"
#define AUTHOR "Author"

public plugin_init ( )
{
   register_plugin ( PLUGIN, VERSION, AUTHOR );
   register_clcmd ( "tel", "teleport" );
}

public teleport(id)
{
   if(!is_user_alive(id))
      return PLUGIN_HANDLED;
      
   static Float:start[3], Float:dest[3]         
   pev(id, pev_origin, start)         
   pev(id, pev_view_ofs, dest)         
   xs_vec_add(start, dest, start)         
   pev(id, pev_v_angle, dest)         
   
   engfunc(EngFunc_MakeVectors, dest)         
   global_get(glb_v_forward, dest)         
   xs_vec_mul_scalar(dest, 9999.0, dest)         
   xs_vec_add(start, dest, dest)         
   engfunc(EngFunc_TraceLine, start, dest, IGNORE_MONSTERS, id, 0)         
   get_tr2(0, TR_vecEndPos, start)         
   get_tr2(0, TR_vecPlaneNormal, dest)         
   
   static const player_hull[] = {HULL_HUMAN, HULL_HEAD}         
   engfunc(EngFunc_TraceHull, start, start, DONT_IGNORE_MONSTERS, player_hull[_:!!(pev(id, pev_flags) & FL_DUCKING)], id, 0)         
   if (!get_tr2(0, TR_StartSolid) && !get_tr2(0, TR_AllSolid) && get_tr2(0, TR_InOpen)) 
   {                 
      engfunc(EngFunc_SetOrigin, id, start)                 
      return PLUGIN_HANDLED         
   }        
   
   static Float:size[3]         
   pev(id, pev_size, size)         
   
   xs_vec_mul_scalar(dest, (size[0] + size[1]) / 2.0, dest)        
   xs_vec_add(start, dest, dest)         
   engfunc(EngFunc_SetOrigin, id, dest)         
   
   return PLUGIN_HANDLED;
}
Multumesc
Image
User avatar
K1d0x
Fost moderator
Fost moderator
Posts: 800
Joined: 26 Feb 2012, 15:57
Detinator Steam: Da
CS Status: We Build Together ;3 RedFear
Detinator server CS: PuB.RedFear.Ro
SteamID: k1dox
Reputatie: Fost moderator ajutator
Location: Reșița
Been thanked: 152 times
Contact:

10 Jul 2012, 16:49

| Afiseaza codul
#include < amxmodx >
#include < cstrike >
#include < fakemeta >
#include < xs >

#define PLUGIN "Teleport"
#define VERSION "1.0"
#define AUTHOR "Author"

new bool:g_hasTeleport[33]
new gPcvar_TeleportCost

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)

   gPcvar_TeleportCost = register_cvar("amx_teleport_cost", "10000")
   register_event("DeathMsg", "death", "a")

   register_clcmd("tel", "teleport")
   register_concmd("say buy_tel", "buy_tel")
}

public buy_tel(id) {
   if(g_hasTeleport[id]) {
      client_print(id, print_chat, "[AMXX] Ai deja un Teleport !")
      return
   }

   if(!is_user_alive(id)) {
      client_print(id,print_chat,"[AMXX] Poti cumpara un Teleport doar cand esti in viata !")
      return
   }

   new money = cs_get_user_money(id)
   new cost = get_pcvar_num(gPcvar_TeleportCost)

   if(money < cost) {
      client_print(id, print_chat, "[AMXX] Nu ai banii necesari ca sa cumperi Teleport. (ai nevoie de $%i).", cost)
      return
   }

   cs_set_user_money(id, money - cost)
   client_print(id, print_chat, "[AMXX] Ai cumparat un Teleport.")
   g_hasTeleport[id] = true

   return
}

public client_connect(id) {
   g_hasTeleport[id] = false
}

public client_disconnect(id) {
   g_hasTeleport[id] = false
}

public death() {
   new id = read_data(2)
   g_hasTeleport[id] = false
}

public teleport(id) {
   if(!is_user_alive(id) || !g_hasTeleport[id])
      return
     
   static Float:start[3], Float:dest[3]         
   pev(id, pev_origin, start)         
   pev(id, pev_view_ofs, dest)         
   xs_vec_add(start, dest, start)         
   pev(id, pev_v_angle, dest)         
   
   engfunc(EngFunc_MakeVectors, dest)         
   global_get(glb_v_forward, dest)         
   xs_vec_mul_scalar(dest, 9999.0, dest)         
   xs_vec_add(start, dest, dest)         
   engfunc(EngFunc_TraceLine, start, dest, IGNORE_MONSTERS, id, 0)         
   get_tr2(0, TR_vecEndPos, start)         
   get_tr2(0, TR_vecPlaneNormal, dest)         
   
   static const player_hull[] = {HULL_HUMAN, HULL_HEAD}         
   engfunc(EngFunc_TraceHull, start, start, DONT_IGNORE_MONSTERS, player_hull[_:!!(pev(id, pev_flags) & FL_DUCKING)], id, 0)         
   if (!get_tr2(0, TR_StartSolid) && !get_tr2(0, TR_AllSolid) && get_tr2(0, TR_InOpen)) {                 
      engfunc(EngFunc_SetOrigin, id, start)                 
      return        
   }       
   
   static Float:size[3]         
   pev(id, pev_size, size)         
   
   xs_vec_mul_scalar(dest, (size[0] + size[1]) / 2.0, dest)       
   xs_vec_add(start, dest, dest)         
   engfunc(EngFunc_SetOrigin, id, dest)         
   
   return
}
Image
32slots.net - Sursa ta de încredere de KIT-uri CS 1.6
RedFear.Ro România - | Afiseaza codul
Vă aştept cu un Register pe Forum
- Suntem în căutare de Dezvoltatori & Administratori :
HTML
PHP
MYSQL
C++
Ofer Server CS spre administrare | Afiseaza codul
Condiții : 
- Să dispui de timp liber
- Să ai cunoștințe AMXX & HLDS
Boostul este asigurat de către Mine (PM pentru. detalii)
ik1d0x@redfear.ro
Paul-Andrei
Membru, skill 0
Membru, skill 0
Posts: 63
Joined: 05 Jul 2011, 20:54
Detinator Steam: Da
CS Status: Putin nu mult.
Detinator server CS: Zombie.XtremeXPC.Ro
SteamID: private
Location: Bucuresti
Has thanked: 9 times
Been thanked: 2 times
Contact:

10 Jul 2012, 21:22

Mersi mult, la compilare a mers perfect.
Thanks!
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests