User
Pass
2FA
 
 

[rezolvat]Log consola

 
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) -> Fixed issues
Author Message2861
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 14-02-2015, 12:27:16 | Translate post to: ... (Click for more languages)

Stie cineva o posibila rezolvare la eroarea aceasta? Tot apare in consola serverului

Code:
L 02/14/2015 - 12:30:42: [ZP] Invalid Player (0)
 L 02/14/2015 - 12:30:42: [AMXX] Displaying debug trace (plugin "10_smok.amxx")
 L 02/14/2015 - 12:30:42: [AMXX] Run time error 10: native error (native "zp_get_user_zombie_class")
 L 02/14/2015 - 12:30:42: [AMXX] [0] f6ew2g72.sma.p::zp_user_infected_post (line 70)


Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 14-02-2015, 13:39:39 | Translate post to: ... (Click for more languages)

ai o problema cu un nativ din 10_smok.amxx posteaza sma de la el..


Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 14-02-2015, 13:44:41 | Translate post to: ... (Click for more languages)

Code:
#include <amxmodx>
#include <zombieplague>
#include <fakemeta>
#include <hamsandwich>
#include <engine>
#include <zombiexp>

#define PLUGIN "[ZP] Class Smoker"
#define VERSION "1.3"
#define AUTHOR "4eRT"

//Main Class, modelT & Sprite Beam
new g_zclass_smoker, g_Line
new const generic_models[][] = { "models/player/zombie_smoker/zombie_smokerT.mdl" }
//Sounds
new g_sndMiss[] = "zombie_plague/Smoker_TongueHit_miss.wav"
new g_sndDrag[] = "zombie_plague/Smoker_TongueHit_drag.wav"
//Some vars
new g_hooked[33], g_hooksLeft[33], g_unable2move[33], g_ovr_dmg[33]
new Float:g_lastHook[33]
new bool: g_bind_use[33] = false, bool: g_bind_or_not[33] = false, bool: g_drag_i[33] = false
//Cvars
new cvar_maxdrags, cvar_dragspeed, cvar_cooldown, cvar_dmg2stop, cvar_mates, cvar_extrahook, cvar_unb2move, cvar_nemesis, cvar_survivor
//Menu keys
new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
//Smoker Atributes
new const zclass_name[] = { "Smoker" }
new const zclass_info[] = { "Poate trage oameni" }
new const zclass_model[] = { "zombie_smoker" }
new const zclass_clawmodel[] = { "v_smoker.mdl" }
const zclass_health = 10600
const zclass_speed = 530
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 0.1
const zclass_level = 10 // level required to use

public plugin_init()
{
   cvar_dragspeed = register_cvar("zp_smoker_dragspeed", "360")
   cvar_maxdrags = register_cvar("zp_smoker_maxdrags", "3")
   cvar_cooldown = register_cvar("zp_smoker_cooldown", "10")
   cvar_dmg2stop = register_cvar("zp_smoker_dmg2stop", "1500")
   cvar_mates = register_cvar("zp_smoker_mates", "0")
   cvar_extrahook = register_cvar("zp_smoker_extrahook", "2")
   cvar_unb2move = register_cvar("zp_smoker_unable_move", "1")
   cvar_nemesis = register_cvar("zp_smoker_nemesis", "0")
   cvar_survivor = register_cvar("zp_smoker_survivor", "1")
   register_event("ResetHUD", "newSpawn", "b")
   register_event("DeathMsg", "smoker_death", "a")
   register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
   RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
   register_clcmd("+drag","drag_start", ADMIN_USER, "bind ^"key^" ^"+drag^"")
   register_clcmd("-drag","drag_end")
   register_menucmd(register_menuid("Vrei bind pentru a putea trage bind V +drag?"), keys, "bind_v_key")
}
public plugin_precache()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   g_zclass_smoker = zpxp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback, zclass_level)
   precache_sound(g_sndDrag)
   precache_sound(g_sndMiss)
   g_Line = precache_model("sprites/zbeam4.spr")
   
   for (new i = 0; i < sizeof generic_models; i++)
   precache_model(generic_models[i])
}

public zp_user_infected_post(id, infector)
{
   if ((zp_get_user_zombie_class(infector) == g_zclass_smoker) && (get_pcvar_num(cvar_extrahook) > 0))
   {
      g_hooksLeft[infector] = g_hooksLeft[infector] + get_pcvar_num(cvar_extrahook)
      set_hudmessage(255, 0, 0, -1.0, 0.45, 0, 0.0, 3.0, 0.01, 0.01, -1)
      show_hudmessage(infector, "+%d drag%s!", get_pcvar_num(cvar_extrahook), (get_pcvar_num(cvar_extrahook) < 2) ? "" : "s")
   }
   
   if (zp_get_user_zombie_class(id) == g_zclass_smoker)
   {
      g_hooksLeft[id] = get_pcvar_num(cvar_maxdrags)
      
      if (!g_bind_or_not[id])
      {
         new menu[192]
         format(menu, 191, "Vrei bind V +drag?^n^n1. Yes^n2. No^n3. Drag on +USE")
         show_menu(id, keys, menu)
      }
   }
}

public newSpawn(id)
{
   if (g_hooked[id])
      drag_end(id)
}

public drag_start(id) // starts drag, checks if player is Smoker, checks cvars
{      
   if (zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_smoker) && !g_drag_i[id]) {
      
      static Float:cdown
      cdown = get_pcvar_float(cvar_cooldown)

      if (!is_user_alive(id)) {
         client_print(id, print_chat, "[ZP] Nu poti trage pentru ca esti mort!")
         return PLUGIN_HANDLED
      }

      if (g_hooksLeft[id] <= 0) {
         client_print(id, print_chat, "[ZP] Nu mai poti trage!")
         return PLUGIN_HANDLED
      }

      if (get_gametime() - g_lastHook[id] < cdown) {
         client_print(id, print_chat, "[ZP] Asteapta %.f0 sec. pentru a trage din nou!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_lastHook[id]))
         return PLUGIN_HANDLED
      }
      
      new hooktarget, body
      get_user_aiming(id, hooktarget, body)
      
      if (zp_get_user_nemesis(id) && get_pcvar_num(cvar_nemesis) == 0) {
         client_print(id, print_chat, "[ZP] Nu poti trage daca esti Nemesis!")
         return PLUGIN_HANDLED
      }
      
      if (is_user_alive(hooktarget)) {
         if (!zp_get_user_zombie(hooktarget))
            {
               if (zp_get_user_survivor(hooktarget) && get_pcvar_num(cvar_survivor) == 0) {
                  client_print(id, print_chat, "[ZP] Nu poti trage Supravietuitorul!")
                  return PLUGIN_HANDLED
               }
               
               g_hooked[id] = hooktarget
               emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH)
            }
         else
            {
               if (get_pcvar_num(cvar_mates) == 1)
               {
                  g_hooked[id] = hooktarget
                  emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH)
               }
               else
               {
                  client_print(id, print_chat, "[ZP] Nu poti trage coechipierii!")
                  return PLUGIN_HANDLED
               }
            }

         if (get_pcvar_float(cvar_dragspeed) <= 0.0)
            cvar_dragspeed = 1
         
         new parm[2]
         parm[0] = id
         parm[1] = hooktarget
         
         set_task(0.1, "smoker_reelin", id, parm, 2, "b")
         harpoon_target(parm)
         
         g_hooksLeft[id]--
         client_print(id, print_chat, "[ZP] Poti trage playerii catre tine %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s")
         g_drag_i[id] = true
         
         if(get_pcvar_num(cvar_unb2move) == 1)
            g_unable2move[hooktarget] = true
            
         if(get_pcvar_num(cvar_unb2move) == 2)
            g_unable2move[id] = true
            
         if(get_pcvar_num(cvar_unb2move) == 3)
         {
            g_unable2move[hooktarget] = true
            g_unable2move[id] = true
         }
      } else {
         g_hooked[id] = 33
         noTarget(id)
         emit_sound(hooktarget, CHAN_BODY, g_sndMiss, 1.0, ATTN_NORM, 0, PITCH_HIGH)
         g_drag_i[id] = true
         g_hooksLeft[id]--
         client_print(id, print_chat, "[ZP] Poti trage playerii catre tine %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s")
      }
   }
   else
      return PLUGIN_HANDLED
   
   return PLUGIN_CONTINUE
}

public smoker_reelin(parm[]) // dragging player to smoker
{
   new id = parm[0]
   new victim = parm[1]

   if (!g_hooked[id] || !is_user_alive(victim))
   {
      drag_end(id)
      return
   }

   new Float:fl_Velocity[3]
   new idOrigin[3], vicOrigin[3]

   get_user_origin(victim, vicOrigin)
   get_user_origin(id, idOrigin)

   new distance = get_distance(idOrigin, vicOrigin)

   if (distance > 1) {
      new Float:fl_Time = distance / get_pcvar_float(cvar_dragspeed)

      fl_Velocity[0] = (idOrigin[0] - vicOrigin[0]) / fl_Time
      fl_Velocity[1] = (idOrigin[1] - vicOrigin[1]) / fl_Time
      fl_Velocity[2] = (idOrigin[2] - vicOrigin[2]) / fl_Time
   } else {
      fl_Velocity[0] = 0.0
      fl_Velocity[1] = 0.0
      fl_Velocity[2] = 0.0
   }

   entity_set_vector(victim, EV_VEC_velocity, fl_Velocity) //<- rewritten. now uses engine
}

public drag_end(id) // drags end function
{
   g_hooked[id] = 0
   beam_remove(id)
   remove_task(id)
   
   if (g_drag_i[id])
      g_lastHook[id] = get_gametime()
   
   g_drag_i[id] = false
   g_unable2move[id] = false
}

public smoker_death() // if smoker dies drag off
{
   new id = read_data(2)
   
   beam_remove(id)
   
   if (g_hooked[id])
      drag_end(id)
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage) // if take damage drag off
{
   if (is_user_alive(attacker) && (get_pcvar_num(cvar_dmg2stop) > 0))
   {
      g_ovr_dmg[victim] = g_ovr_dmg[victim] + floatround(damage)
      if (g_ovr_dmg[victim] >= get_pcvar_num(cvar_dmg2stop))
      {
         g_ovr_dmg[victim] = 0
         drag_end(victim)
         return HAM_IGNORED;
      }
   }

   return HAM_IGNORED;
}

public fw_PlayerPreThink(id)
{
   if (!is_user_alive(id))
      return FMRES_IGNORED
   
   new button = get_user_button(id)
   new oldbutton = get_user_oldbutton(id)
   
   if (g_bind_use[id] && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_smoker))
   {
      if (!(oldbutton & IN_USE) && (button & IN_USE))
         drag_start(id)
      
      if ((oldbutton & IN_USE) && !(button & IN_USE))
         drag_end(id)
   }
   
   if (!g_drag_i[id]) {
      g_unable2move[id] = false
   }
      
   if (g_unable2move[id] && get_pcvar_num(cvar_unb2move) > 0)
   {
      set_pev(id, pev_maxspeed, 1.0)
   }
   
   return PLUGIN_CONTINUE
}

public client_disconnect(id) // if client disconnects drag off
{
   if (id <= 0 || id > 32)
      return
   
   if (g_hooked[id])
      drag_end(id)
   
   if(g_unable2move[id])
      g_unable2move[id] = false
}

public harpoon_target(parm[]) // set beam (ex. tongue:) if target is player
{
   new id = parm[0]
   new hooktarget = parm[1]

   message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
   write_byte(8)   // TE_BEAMENTS
   write_short(id)
   write_short(hooktarget)
   write_short(g_Line)   // sprite index
   write_byte(0)   // start frame
   write_byte(0)   // framerate
   write_byte(200)   // life
   write_byte(8)   // width
   write_byte(1)   // noise
   write_byte(155)   // r, g, b
   write_byte(155)   // r, g, b
   write_byte(55)   // r, g, b
   write_byte(90)   // brightness
   write_byte(10)   // speed
   message_end()
}

public bind_v_key(id, keys)
{
   g_bind_or_not[id] = true
   switch(keys)
   {
      case 0:
         client_cmd(id, "bind v ^"+drag^"")
   
      case 1:
         client_print(id, print_chat, "[ZP] Pentru a trage un player la tine (bind ^'^'key^'^' ^'^'+drag^'^') si tine apasata tasta")
         
      case 2:
         g_bind_use[id] = true
         
      default:
         g_bind_or_not[id] = false
   }
   
   return PLUGIN_HANDLED
}

public noTarget(id) // set beam if target isn't player
{
   new endorigin[3]

   get_user_origin(id, endorigin, 3)

   message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
   write_byte( TE_BEAMENTPOINT ); // TE_BEAMENTPOINT
   write_short(id)
   write_coord(endorigin[0])
   write_coord(endorigin[1])
   write_coord(endorigin[2])
   write_short(g_Line) // sprite index
   write_byte(0)   // start frame
   write_byte(0)   // framerate
   write_byte(200)   // life
   write_byte(8)   // width
   write_byte(1)   // noise
   write_byte(155)   // r, g, b
   write_byte(155)   // r, g, b
   write_byte(55)   // r, g, b
   write_byte(75)   // brightness
   write_byte(0)   // speed
   message_end()
}

public beam_remove(id) // remove beam
{
   message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
   write_byte(99)   //TE_KILLBEAM
   write_short(id)   //entity
   message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/


Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 14-02-2015, 13:52:25 | Translate post to: ... (Click for more languages)

Inlocuieste linia 70 cu asta
Code:

   if( zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_smoker) && (get_pcvar_num(cvar_extrahook) > 0))

sa imi spui daca merge.



Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 14-02-2015, 14:54:22 | Translate post to: ... (Click for more languages)

da eroare la compilare

Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 14-02-2015, 16:16:41 | Translate post to: ... (Click for more languages)

poftim nu ai inlocuit bine
Spoiler:



Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 14-02-2015, 20:22:13 | Translate post to: ... (Click for more languages)

mersi pt smoker. Mai am o clasa la care imi apare tot asa. Daca poti sa mil faci tu dar vreau sa colorezi unde ai modificat si cu ce sa stiu de aici incolo sa nu te mai incurc

Code:
L 02/14/2015 - 20:21:26: [AMXX] Displaying debug trace (plugin "15_predator.amxx")
 L 02/14/2015 - 20:21:26: [AMXX] Run time error 10: native error (native "zp_get_user_zombie_class")
 L 02/14/2015 - 20:21:26: [AMXX] [0] 0j8zag0h.sma.p::fw_TakeDamage (line 207)


Spoiler:


Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 14-02-2015, 20:26:44 | Translate post to: ... (Click for more languages)

Spoiler:



Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 14-02-2015, 20:31:27 | Translate post to: ... (Click for more languages)

eroare compilare 15_predator.sma(207) : error 017: undefined symbol "id"

Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
anoniM.xD
[Banned user]


Banned


Status: Offline
(since 15-03-2015 21:43)
Joined: 04 Feb 2015
Posts: 92, Topics: 19
Location: Pitesti

Reputation: -103.8
Votes: 21

   
Post Posted: 14-02-2015, 21:51:50 | Translate post to: ... (Click for more languages)

zp.Bodo wrote:
eroare compilare 15_predator.sma(207) : error 017: undefined symbol "id"


dute la linia aia si in loc de id pui player.

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 15-02-2015, 12:47:01 | Translate post to: ... (Click for more languages)

Nimeni?

Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 15-02-2015, 14:54:08 | Translate post to: ... (Click for more languages)

zp.Bodo wrote:
Nimeni?

Greseala mea scuze din graba
Spoiler:



Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
zp.Bodo

[Creep]



Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663, Topics: 166
Location: Romania

Reputation: 548.2
Votes: 20

       
Post Posted: 19-02-2015, 18:03:21 | Translate post to: ... (Click for more languages)

nu merge, tot asa da
Code:

L 02/19/2015 - 18:10:14: [ZP] Invalid Player (0)
 L 02/19/2015 - 18:10:14: [AMXX] Displaying debug trace (plugin "15_predator.amxx")
 L 02/19/2015 - 18:10:14: [AMXX] Run time error 10: native error (native "zp_get_user_zombie_class")
 L 02/19/2015 - 18:10:14: [AMXX] [0] 5xe4l720.sma.p::zp_user_infected_post (line 66)


Contact Skype | zm.bodo
Grup Facebook | CSRO 2k17+
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 22-02-2015, 15:22:39 | Translate post to: ... (Click for more languages)

incearca alta clasa de predator de pe net am vazut ca sunt foarte multe..


Retired from Amxmodx

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, 22 April 2015 07:42



 
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) -> Fixed issues  


The time now is 05-02-2025, 21:52:45
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