User
Pass
2FA
 
 

[rezolvat]Cerere plugin XP

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message553
vitanfitt

[Veni Vidi Vici]



Status: Offline
(since 09-10-2018 20:27)
Joined: 13 Oct 2016
Posts: 214, Topics: 25
Location: Gym

Reputation: 46.8
Votes: 20

   
Post Posted: 14-01-2017, 20:36:24 | Translate post to: ... (Click for more languages)

Descriere: Daca se poate sa se adauge doua "CASE-uri" sa deie si XP 50+ iar celalalt 100+
Alte specificatii: - sa dispara cutiile dupa un anumit timp...30 de secunde de exemplu, dupa ce a murit jucatorul sa ramana cutia 30 secunde max dupa sa dispara

P.S: XP-ul sa fie din WAr3FT 3.0rc13 ...eu nu gasesc nativul si nu stiu cum sa-l bag
P.S2: Am pus aici include-urile din war3ft
http://www78.zippyshare.com/v/MZohElO7/file.html



Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < engine >
#include < fakemeta_util >
#include < cstrike >
#include < colorchat>

#define PLUGIN "Bonus Box v2"
#define VERSION "1.0"
#define AUTHOR "MegastorM"

#define TASK_BONUS 1234

new box_model[] = { "models/box/w_bonus2.mdl" }
new const szPrefix[26] = "^4[^3RESPAWN.Freakz.Ro^4]"
new g_sprite
new Float:Origin[3], Float:Angle[3]

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   register_event("DeathMsg", "event_death", "ade");
   register_touch("BonusBox", "player",  "touchbox");
   // Add your code here...
}

public plugin_precache()
{
   precache_model(box_model)
   g_sprite = precache_model("sprites/box/box_sprite.spr")
   precache_sound("box/touched.wav")
}

public event_death()
{
   new victim = read_data(2)
   if(is_user_connected(victim))
   {
      get_origin(victim)
     
      set_task(0.1,"create_bonusbox",TASK_BONUS)
   }
}

public get_origin(id)
{
   pev(id, pev_origin, Origin)
   pev(id, pev_angles, Angle)
   Angle[0] = 0.0
}

public create_bonusbox()
{
   new ent = create_entity("info_target")
   
   entity_set_origin(ent, Origin)
   entity_set_string(ent, EV_SZ_classname, "BonusBox")
   entity_set_model(ent, box_model)
   entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
   entity_set_int(ent, EV_INT_movetype, MOVETYPE_PUSHSTEP)
   
   entity_set_size(ent,Float:{-2.0,-2.0,-2.0},Float:{5.0,5.0,5.0})
   
   drop_to_floor(ent)
   
   engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, Origin, 0)
   write_byte(TE_BEAMCYLINDER) // TE id
   engfunc(EngFunc_WriteCoord, Origin[0]) // x
   engfunc(EngFunc_WriteCoord, Origin[1]) // y
   engfunc(EngFunc_WriteCoord, Origin[2]) // z
   engfunc(EngFunc_WriteCoord, Origin[0]) // x axis
   engfunc(EngFunc_WriteCoord, Origin[1]) // y axis
   engfunc(EngFunc_WriteCoord, Origin[2]+385.0) // z axis
   write_short(g_sprite) // sprite
   write_byte(0) // startframe
   write_byte(0) // framerate
   write_byte(4) // life
   write_byte(30) // width
   write_byte(0) // noise
   write_byte(250) // red
   write_byte(0) // green
   write_byte(0) // blue
   write_byte(200) // brightness
   write_byte(0) // speed
   message_end()
}

public touchbox(ent, toucher)
{
   if (!is_user_alive(toucher) || !pev_valid(ent))
      return FMRES_IGNORED
   
   new classname[32]   
   pev(ent, pev_classname, classname, 31)
   if (!equal(classname, "BonusBox"))
      return FMRES_IGNORED
   
   open_bonusbox(toucher)
   
   emit_sound(toucher, CHAN_ITEM, "box/touched.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
   
   set_pev(ent, pev_effects, EF_NODRAW)
   set_pev(ent, pev_solid, SOLID_NOT)
   remove_ent(ent)
   return FMRES_IGNORED
   
}

public open_bonusbox(id)
{
   switch(random_num(1, 13))
   {
      case 1:
      {
         fm_give_item(id, "weapon_elite")
         cs_set_user_bpammo(id, CSW_ELITE,120)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 Dual Elites",szPrefix)
      }
      case 2:
      {
         fm_give_item(id, "weapon_sg552")
         cs_set_user_bpammo(id, CSW_SG552,90)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 Krieg 552 Commando",szPrefix)
      }
      case 3:
      {
         fm_give_item(id, "weapon_galil")
         cs_set_user_bpammo(id, CSW_GALIL,90)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 IDF Galil Defender",szPrefix)
      }
      case 4:
      {
         ColorChat(id, TEAM_COLOR, "%s^1 Din pacate, nu ai primit nimic acum, mai mult noroc data viitoare!",szPrefix)
      }
      case 5:
      {
         fm_give_item(id, "weapon_xm1014")
         cs_set_user_bpammo(id, CSW_XM1014,32)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 Shotgun",szPrefix)
      }
      case 6:
      {
         fm_give_item(id, "weapon_m249")
         cs_set_user_bpammo(id, CSW_M249,200)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 Machine Gun",szPrefix)
      }
      case 7:
      {
         ColorChat(id, TEAM_COLOR, "%s^1 Din pacate, nu ai primit nimic acum, mai mult noroc data viitoare!",szPrefix)
      }
      case 8:
      {
         fm_set_user_health(id, get_user_health(id)+35)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 +35HP",szPrefix)
      }
      case 9:
      {
         fm_set_user_health(id, get_user_health(id)+70)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 +70HP",szPrefix)
      }
      case 10:
      {
         ColorChat(id, TEAM_COLOR, "%s^1 Din pacate, nu ai primit nimic acum, mai mult noroc data viitoare!",szPrefix)
      }
      case 11:
      {
         cs_set_user_money(id, cs_get_user_money(id)+1000)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit^3 +1000$",szPrefix)
      }
      case 12:
      {
         cs_set_user_money(id, cs_get_user_money(id)+5000)
         ColorChat(id, TEAM_COLOR, "%s^1 Ai primit ^3 +5000$",szPrefix)
      }
      case 13:
      {
         cs_set_user_money(id, 0)
         ColorChat(id, TEAM_COLOR, "%s^1 Din pacate^3 ai pierdut toti banii",szPrefix)
      }
   }
}

public remove_ent(ent)
{
   if (pev_valid(ent))
      engfunc(EngFunc_RemoveEntity, ent)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1066\\ f0\\ fs16 \n\\ par }
*/
[/code]


Maybe you should train as hard as you hate
-
0 0
  
Back to top
View user's profile Send private message
vitanfitt

[Veni Vidi Vici]



Status: Offline
(since 09-10-2018 20:27)
Joined: 13 Oct 2016
Posts: 214, Topics: 25
Location: Gym

Reputation: 46.8
Votes: 20

   
Post Posted: 18-01-2017, 19:09:05 | Translate post to: ... (Click for more languages)

rezolvat -

Maybe you should train as hard as you hate
-
0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by TwisTer, 18 January 2017 17:45



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 28-04-2024, 19:47:58
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x