Jump to content

Cerere VIP RESPAWN


Denisa

Recommended Posts

Cica avem un scripter pe forum, sa vedem.

 

Vreau un plugin VIP pentru RESPAWN, nu am nevoie de pluginurile de pe Internet, TOATE au fost incercate.

In primul rand ma intereseaza sa nu imi faca lag pe server, in al doilea rand:

Pluginul sa contina 150 hp la fiecare spawn.

Viteza pe cutit mai mare, sa zicem 400, pe server este de 350 arme ~ 370 cutit.

150 armura.

Multijump.

Doresc si sma-ul de la el deoarece vreau sa pot modifica oricand hp-ul si armura, respectiv viteza.

 

L:E: Am incercat si pluginurile postate in cererea anterioara, insa pica server-ul de la ele.

  • Like 3
Link to comment
Share on other sites

LAsa-mi log-ul cu erorile, ca sa stiu de ce pica, sa nu cumva sa pun si eu ceva in plugin care sa pice serverul.

 

EDIT: Incearca asta

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <fakemeta>

new cvar_hp, cvar_ap, cvar_speed

new const TAG[] = "[RESPAWN]"
new p_LastSpeed[33]

public plugin_init()
{
    register_plugin("VIP Respawn", "1.0", "dK^aLeX")
    
    cvar_ap = register_cvar("amx_spawn_ap", "150")
    cvar_hp = register_cvar("amx_spawn_hp", "150")
    cvar_speed = register_cvar("amx_knife_speed", "400")
    
    RegisterHam(Ham_Spawn, "player", "fw_hpap", 1)
    
    register_forward(FM_PlayerPreThink, "fw_speed")
    
}

public client_connect(id)
{
    new Flags = get_user_flags(id)
    new Read = read_flags("t")
    
    if(Flags & Read)
    {
        new szName[32]
        get_user_name(id, szName, charsmax(szName))
        
        client_print(0, print_chat, "%s VIP-ul %s se conecteaza pe server!", TAG, szName)
    }
}

public fw_hpap(iPlayer)
{
    new Flags = get_user_flags(iPlayer)
    new Read = read_flags("t")
    
    if(Flags & Read)
    {        
        set_user_armor(iPlayer, get_pcvar_num(cvar_ap))
        
        set_user_health(iPlayer, get_pcvar_num(cvar_hp))
        
        client_print(iPlayer, print_chat, "%s Ai primit %s HP & %s AP.", TAG, get_pcvar_num(cvar_hp), get_pcvar_num(cvar_ap))
    }
}

public fw_speed(id)
{
    new Flags = get_user_flags(id)
    new Read = read_flags("t")
    
    if(Flags & Read)
    {
        new szTemp, szWeapon = get_user_weapon(id, szTemp, szTemp)
        if(szWeapon == CSW_KNIFE)
        {
            pev(id, pev_maxspeed, p_LastSpeed[id])
            set_pev(id, pev_maxspeed,  get_pcvar_float(cvar_speed))
        }
        else
        {
            return PLUGIN_HANDLED;
        }
    }
    
    return PLUGIN_CONTINUE;
}

 

 

Daca ai pluginul multijump, pune amx_mjadminonly "2" // 2 sarituri + default 1.

sv_maxpseed "500" // Speed-ul maxim

Link to comment
Share on other sites

LAsa-mi log-ul cu erorile, ca sa stiu de ce pica, sa nu cumva sa pun si eu ceva in plugin care sa pice serverul.

 

EDIT: Incearca asta

#include <amxmodx>

#include <amxmisc>

#include <fun>

#include <hamsandwich>

#include <fakemeta>

 

new cvar_hp, cvar_ap, cvar_speed

 

new const TAG[] = "[RESPAWN]"

new p_LastSpeed[33]

 

public plugin_init()

{

    register_plugin("VIP Respawn", "1.0", "dK^aLeX")

    

    cvar_ap = register_cvar("amx_spawn_ap", "150")

    cvar_hp = register_cvar("amx_spawn_hp", "150")

    cvar_speed = register_cvar("amx_knife_speed", "400")

    

    RegisterHam(Ham_Spawn, "player", "fw_hpap", 1)

    

    register_forward(FM_PlayerPreThink, "fw_speed")

    

}

 

public client_connect(id)

{

    new Flags = get_user_flags(id)

    new Read = read_flags("t")

    

    if(Flags & Read)

    {

        new szName[32]

        get_user_name(id, szName, charsmax(szName))

        

        client_print(0, print_chat, "%s VIP-ul %s se conecteaza pe server!", TAG, szName)

    }

}

 

public fw_hpap(iPlayer)

{

    new Flags = get_user_flags(iPlayer)

    new Read = read_flags("t")

    

    if(Flags & Read)

    {        

        set_user_armor(iPlayer, get_pcvar_num(cvar_ap))

        

        set_user_health(iPlayer, get_pcvar_num(cvar_hp))

        

        client_print(iPlayer, print_chat, "%s Ai primit %s HP & %s AP.", TAG, get_pcvar_num(cvar_hp), get_pcvar_num(cvar_ap))

    }

}

 

public fw_speed(id)

{

    new Flags = get_user_flags(id)

    new Read = read_flags("t")

    

    if(Flags & Read)

    {

        new szTemp, szWeapon = get_user_weapon(id, szTemp, szTemp)

        if(szWeapon == CSW_KNIFE)

        {

            pev(id, pev_maxspeed, p_LastSpeed[id])

            set_pev(id, pev_maxspeed,  get_pcvar_float(cvar_speed))

        }

        else

        {

            return PLUGIN_HANDLED;

        }

    }

    

    return PLUGIN_CONTINUE;

}

 

 

Daca ai pluginul multijump, pune amx_mjadminonly "2" // 2 sarituri + default 1.

sv_maxpseed "500" // Speed-ul maxim

 

 

Nu merge, pica server-ul.

Nu`mi cere erorile care mi le da, ii acelasi plugin care se gaseste peste tot pe internet, tu doar ai modificat sa contina ceea ce am cerut, asta pot sa fac si eu. Multumesc`

Poate ma poate ajuta don liviu cand are timp.

Link to comment
Share on other sites

Nu merge, pica server-ul.

Nu`mi cere erorile care mi le da, ii acelasi plugin care se gaseste peste tot pe internet, tu doar ai modificat sa contina ceea ce am cerut, asta pot sa fac si eu. Multumesc`

Poate ma poate ajuta don liviu cand are timp.

Nu prea are cum sa pice, ai cumva 2 pluginuri pe server cu nume diferite? Daca ai knife speed, scoate-l, daca ai ghostchat, scoate-l....

Link to comment
Share on other sites

Credema, a fost testat pe server.

Crezi ca mie nu mi-ar fi convenit sa imi mearga?

 

Ce treaba are una cu alta? Ghostchat nu folosim, avem ceva mult mai bun, iar pluginul de csdmknife NU ARE ABSOLUT NICIUN BUG.

Stiu si eu cate ceva de asa ceva, asta doar ca fapt divers.

Link to comment
Share on other sites

Draga Denisa, ai csdmknife, care mareste viteza, ei bine, si pluginul VIP mareste viteza la cutit, iar,  se spune, cand sunt 2 pluginuri cu nume diferite[care fac acelasi lucru] , da crash (scote-l)

Link to comment
Share on other sites

E logic ca atunci cand Adry a testat pluginul de VIP a dezactivat csdmknife ( asta ca nu am specificat mai sus ), asta 1 la mana.

2 la mana, crezi ca Adry are server de 2 zile si ca nu stie lucru elementar ?

3 la mana PLUGINUL CARE L-AI PUS TU, este exact cel care se gaseste pe internet, cum am specificat mai sus, l-am testat si pe acesta si pe acelea, NU IL MAI TESTEZ ODATA, nu fac teste pe server-ul meu, nu imi permit sa pierd playeri din cauza unui plugin care nu functioneaza si imi inchide server-ul.

4 la mana, daca nu mai pui vreo varianta, o sa te rog sa te abtii de la comentarii si astept si ceilalti moderatori ( daca stiu ) sa posteze.

Nu ma lua cu draga Denisa.

 

Multumesc`

  • Like 2
Link to comment
Share on other sites

Flag g


 

 

/* Plugin generated by AMXX-Studio */

#include
#include
#include
#include
#include
#include

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "appLy"
#define VIPS ADMIN_LEVEL_H

new jumpnum[33] = 0
new bool:dojump[33] = false


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Spawn, "player", "ham_SpawnPlayerPost", true );
register_event( "CurWeapon", "CurWeapon", "be", "1=1" );
register_cvar("vip_maxjumps","1")
register_cvar("vip_mjonly","1")

// Add your code here...
}

public ham_SpawnPlayerPost( id ) {
if( is_user_alive( id ) )
if( get_user_flags(id) & VIPS)
{
set_user_health( id, 150 );
set_user_armor( id, 150 );
}
}

public client_putinserver(id)
{
jumpnum[id] = 0
dojump[id] = false
}

public client_disconnect(id)
{
jumpnum[id] = 0
dojump[id] = false
}


public CurWeapon( id )
{
new Weapon = get_user_weapon ( id );

if ( Weapon == CSW_KNIFE && get_user_flags(id) & VIPS)
set_user_maxspeed( id, 400.0 );
}

public client_PreThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("vip_mjonly") && (!access(id,VIPS))) return PLUGIN_CONTINUE
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < get_cvar_num("vip_maxjumps"))
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("vip_mjonly") && (!access(id,VIPS))) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}

Link to comment
Share on other sites

Flag g

 

 

 

/* Plugin generated by AMXX-Studio */

 

#include

#include

#include

#include

#include

#include

 

#define PLUGIN "New Plug-In"

#define VERSION "1.0"

#define AUTHOR "appLy"

#define VIPS ADMIN_LEVEL_H

 

new jumpnum[33] = 0

new bool:dojump[33] = false

 

 

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHam( Ham_Spawn, "player", "ham_SpawnPlayerPost", true );

register_event( "CurWeapon", "CurWeapon", "be", "1=1" );

register_cvar("vip_maxjumps","1")

register_cvar("vip_mjonly","1")

 

// Add your code here...

}

 

public ham_SpawnPlayerPost( id ) {

if( is_user_alive( id ) )

if( get_user_flags(id) & VIPS)

{

set_user_health( id, 150 );

set_user_armor( id, 150 );

}

}

 

public client_putinserver(id)

{

jumpnum[id] = 0

dojump[id] = false

}

 

public client_disconnect(id)

{

jumpnum[id] = 0

dojump[id] = false

}

 

 

public CurWeapon( id )

{

new Weapon = get_user_weapon ( id );

 

if ( Weapon == CSW_KNIFE && get_user_flags(id) & VIPS)

set_user_maxspeed( id, 400.0 );

}

 

public client_PreThink(id)

{

if(!is_user_alive(id)) return PLUGIN_CONTINUE

if(get_cvar_num("vip_mjonly") && (!access(id,VIPS))) return PLUGIN_CONTINUE

new nbut = get_user_button(id)

new obut = get_user_oldbutton(id)

if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))

{

if(jumpnum[id] < get_cvar_num("vip_maxjumps"))

{

dojump[id] = true

jumpnum[id]++

return PLUGIN_CONTINUE

}

}

if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))

{

jumpnum[id] = 0

return PLUGIN_CONTINUE

}

return PLUGIN_CONTINUE

}

 

public client_PostThink(id)

{

if(!is_user_alive(id)) return PLUGIN_CONTINUE

if(get_cvar_num("vip_mjonly") && (!access(id,VIPS))) return PLUGIN_CONTINUE

if(dojump[id] == true)

{

new Float:velocity[3]

entity_get_vector(id,EV_VEC_velocity,velocity)

velocity[2] = random_float(265.0,285.0)

entity_set_vector(id,EV_VEC_velocity,velocity)

dojump[id] = false

return PLUGIN_CONTINUE

}

return PLUGIN_CONTINUE

}

E o mare porcarie.

 

In plugin spune cam asa.

 

Daca userul nu are acces, returneaza.

Dupa, dai la toti VIP-i cate o saritura + mai dai vreo 2 cu vip_mjonly, si RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn") asa e corect.

 

Revin cu edit, cu ceva functional.

 

 

EDIT:

#include <amxmodx>

#include <amxmisc>

#include <fun>

#include <hamsandwich>

 

#define IPS   "192.168.1.3:27015"

#define VIP   "a"

 

new const g_TAG[] = "[VIP]"

 

public plugin_init() {

    new IP[25]

    get_user_ip(0, IP, sizeof(IP) -1, 1)

    if(equal(IP, IPS)) {

        register_plugin("VIP", "1.0", "dK^aLeX")

        

        RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn")

        

        register_clcmd("say", "chksay")

        register_clcmd("say_team", "chksay")

    }

}

 

public chksay(id) {

    new Arg[32]

    read_argv(1, Arg, 31)

    remove_quotes(Arg)

    if(equal(Arg, "/wantvip") != -1) {

        show_motd(id, "addons/amxmodx/configs/vip.html")

    }

}

 

public fw_PlayerSpawn(id) {

    if(get_user_flags(id) && read_flags(VIP)) {

        set_user_armor(id, 100)

        set_user_health(id, 150)

    }

}

 

public client_connect(id) {

    if(get_user_flags(id) && read_flags(VIP)) {

        new sName[32]

        get_user_name(id, sName, charsmax(sName))

        client_print(id, print_chat, "[%s] VIP player %s is connecting!", g_TAG, sName)

    }

}

 

Edited by hades # ownage
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn") -> RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn", 1) (asa e corect) :)
Link to comment
Share on other sites

Flagul la vip e "t"

 

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <hamsandwich>

#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "0.Ox"
#define AUTHOR "Hades Ownage"

#define	VIP_HEALTH	150
#define	VIP_ARMOR	150
#define	KNIFE_SPEED	400
#define VIP_FLAG	ADMIN_LEVEL_H

new jumpnum [ 33 ] = 0
new bool: dojump [ 33 ] = false;

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam ( Ham_Spawn, "player", "Player_Spawn", 1 );
	
	register_cvar ( "vip_maxjumps", "1" );
	
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );
}

public client_putinserver ( id ) {
	
	jumpnum [ id ] = 0;
	dojump [ id ] = false;
}

public client_disconnect ( id ) client_putinserver ( id );

public Player_Spawn ( id ) {
	
	if ( is_user_alive ( id ) && is_user_vip ( id ) ) {
		
		set_user_health ( id, VIP_HEALTH );
		set_user_armor ( id, VIP_ARMOR );
		
	}
	
}

public CurrentWeapon ( id ) {
	
	if ( is_user_vip ( id ) && get_user_weapon ( id ) == CSW_KNIFE )
		set_user_maxspeed ( id, float ( KNIFE_SPEED ) );
}

// Multi Jump

public client_PreThink(id)
{
	if(!is_user_alive(id) || !is_user_vip ( id )) return PLUGIN_CONTINUE
	new nbut = get_user_button(id)
	new obut = get_user_oldbutton(id)
	if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
	{
		if(jumpnum[id] < get_cvar_num("vip_maxjumps"))
		{
			dojump[id] = true
			jumpnum[id]++
			return PLUGIN_CONTINUE
		}
	}
	if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
	{
		jumpnum[id] = 0
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
	if(!is_user_alive(id) || !is_user_vip ( id )) return PLUGIN_CONTINUE
	if(dojump[id] == true)
	{
		new Float:velocity[3]	
		entity_get_vector(id,EV_VEC_velocity,velocity)
		velocity[2] = random_float(265.0,285.0)
		entity_set_vector(id,EV_VEC_velocity,velocity)
		dojump[id] = false
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}	

bool: is_user_vip ( id ) {
	
	if ( get_user_flags  ( id ) & VIP_FLAG )
		return true;
		
	return false;
	
}

 

 

  • Like 3
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...