hlmod.hu
https://hlmod.hu/

Gyors kés
https://hlmod.hu/viewtopic.php?f=10&t=27001
Oldal: 1 / 1

Szerző:  Tomos [ 2017.01.05. 17:37 ]
Hozzászólás témája:  Gyors kés

Valaki ebbe a pluginba bele tudná írni hogy csak akkor índuljon el ha a freezetime lejárt.

Kód:
#include <amxmodx>
#include <amxmisc>
#include <fun>
 
#pragma semicolon 1
 
new Gyors;
 
public plugin_init() {
    register_plugin("GyorsKes", "1.0", "Pardon");
   
    Gyors = register_cvar("Gyors Kes", "380");
   
    register_event("CurWeapon", "WeaponSwitch", "be", "1=1");
   
}
public WeaponSwitch(id)
{
    if(get_user_weapon(id) == CSW_KNIFE)
    {
        new Float:Kes = get_pcvar_float(Gyors);
        set_user_maxspeed(id, Float: Kes);
    }
}

Szerző:  HuBaBuBa [ 2017.01.05. 19:55 ]
Hozzászólás témája:  Re: Gyors kés

  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4.  
  5. #pragma semicolon 1
  6.  
  7. new Gyors;
  8. new bool:fagyas;
  9.  
  10. public plugin_init() {
  11.     register_plugin("GyorsKes", "1.0", "Pardon");
  12.    
  13.     Gyors = register_cvar("Gyors Kes", "380");
  14.    
  15.     register_event("CurWeapon", "WeaponSwitch", "be", "1=1");
  16.     register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
  17.     register_logevent("logevent_round_start", 2, "1=Round_Start");
  18.    
  19. }
  20. public event_new_round() {
  21.     fagyas = true;
  22. }
  23. public logevent_round_start() {
  24.     fagyas = false;
  25. }
  26.    
  27. public WeaponSwitch(id)
  28. {
  29.     if(get_user_weapon(id) == CSW_KNIFE && !fagyas)
  30.     {
  31.         new Float:Kes = get_pcvar_float(Gyors);
  32.         set_user_maxspeed(id, Float: Kes);
  33.     }
  34. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/