Tutoriale scripting, cod si portiuni de cod.
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
-
wstsw
- Membru, skill 0
- Posts: 12
- Joined: 07 Apr 2016, 20:07
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com...!
- Detinator server CS: Da
- SteamID: ramparstynkins
- Fond eXtream: 0
-
Contact:
29 Dec 2016, 13:45
A-si dori sa aivea acces la aceste 2 pluginuri doare ADMIN_LEVEL_H sau daca este posibil sa fie unite cele 2 pluginuri.
Multumesc
- | Afiseaza codul
#include <amxmodx>
#include <fun>
#pragma semicolon 1
#define SPEED 500
static const PLUGIN[ ] = "PLUGIN";
static const VERSION[ ] = "1.0";
static const AUTHOR[ ] = "Rap";
public plugin_init( )
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("CurWeapon", "EventCurWeapon", "be", "1=1") ;
}
public EventCurWeapon(id)
{
new iWeapon = read_data(2);
if( iWeapon == CSW_KNIFE )
{
set_user_maxspeed(id, float(SPEED));
}
}
- | Afiseaza codul
#include <amxmodx>
#include <engine>
public client_PreThink(id)
{
if(!is_user_alive(id))
return
new Float:fallspeed = 100.0 * -1.0
new button = get_user_button(id)
if(button & IN_USE)
{
new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)
if (velocity[2] < 0.0)
{
entity_set_int(id, EV_INT_sequence, 3)
entity_set_int(id, EV_INT_gaitsequence, 1)
entity_set_float(id, EV_FL_frame, 1.0)
entity_set_float(id, EV_FL_framerate, 1.0)
velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed
entity_set_vector(id, EV_VEC_velocity, velocity)
}
}
}
-
Fuffy
- Membru, skill +1
- Posts: 299
- Joined: 07 Jan 2016, 08:34
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com...!
- Fond eXtream: 0
-
Contact:
30 Dec 2016, 13:02
- SMA | Afiseaza codul
#include <amxmodx>
#include <fun>
#include <engine>
#pragma semicolon 1
const SPEED = 500;
static const PLUGIN[ ] = "PLUGIN";
static const VERSION[ ] = "1.0";
static const AUTHOR[ ] = "Rap";
#define IsAcces(%0) ( get_user_flags(%0) & ADMIN_LEVEL_H )
public plugin_init( )
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("CurWeapon", "EventCurWeapon", "be", "1=1") ;
}
public EventCurWeapon(id)
{
new iWeapon = read_data(2);
if( IsAcces(id) && iWeapon == CSW_KNIFE )
{
set_user_maxspeed(id, float(SPEED));
}
}
public client_PreThink(id)
{
if(!is_user_alive(id))
return;
new Float:fallspeed = 100.0 * -1.0;
new button = get_user_button(id);
if(IsAcces(id) && button & IN_USE)
{
new Float:velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
if (velocity[2] < 0.0)
{
entity_set_int(id, EV_INT_sequence, 3);
entity_set_int(id, EV_INT_gaitsequence, 1);
entity_set_float(id, EV_FL_frame, 1.0);
entity_set_float(id, EV_FL_framerate, 1.0);
velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed;
entity_set_vector(id, EV_VEC_velocity, velocity);
}
}
}
AMXX Blue e acum doar pe
github.
-
wstsw
- Membru, skill 0
- Posts: 12
- Joined: 07 Apr 2016, 20:07
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com...!
- Detinator server CS: Da
- SteamID: ramparstynkins
- Fond eXtream: 0
-
Contact:
30 Dec 2016, 15:39
Multumesc frumos.
-
Users browsing this forum: No registered users and 9 guests