AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ZP] Extra item ghost (https://forums.alliedmods.net/showthread.php?t=129346)

lashsh 06-12-2010 01:09

[ZP] Extra item ghost
 
1 Attachment(s)
PHP Code:

#include <amxmodx>
#include <zombieplague>
#include <fun>

new g_itemid1

public plugin_init()
{
register_plugin("[ZP] Extra Item: Mochveneba""0.1""LaSsHhH"
g_itemid1 zp_register_extra_item("Mochveneba"133ZP_TEAM_ANY)

}

public 
zp_extra_item_selected(playeritemid)
{
// check if the selected item matches any of our registered ones
if (itemid == g_itemid1)
client_print(playerprint_chat"[ZP] Tqven iyidet mochveneba!")


how to enable and where are they?

PHP Code:

set_user_maxspeed(player400)
set_user_noclip(player1

and this model

Oneshox 06-12-2010 01:56

Re: [ZP] Extra item ghost
 
what do you want now?

lashsh 06-12-2010 04:33

Re: [ZP] Extra item ghost
 
Quote:

Originally Posted by Oneshox (Post 1206426)
what do you want now?

http://forums.alliedmods.net/showpos...10&postcount=1

Oneshox 06-12-2010 04:37

Re: [ZP] Extra item ghost
 
here:
Code:

#include <amxmodx>
#include <zombieplague>
#include <fun>

new g_item
new cvar_noclip, cvar_speed

public plugin_init()
{
        register_plugin("[ZP] Extra Item: Mochveneba", "0.1", "LaSsHhH") 
        g_item = zp_register_extra_item("Mochveneba", 133, ZP_TEAM_ANY)

        cvar_speed = register_cvar("zp_item_speed", "400") // here you can edit the max speed
        cvar_noclip = register_cvar("zp_item_noclip", "1") // 1 - enable / 2 - disable

}

public zp_extra_item_selected(player, itemid)
{
        if (itemid == g_item)
        client_print(player, print_chat, "[ZP] Tqven iyidet mochveneba!")

        set_user_maxspeed(player, get_user_maxspeed(player) + get_pcvar_num(cvar_speed))
        set_user_noclip(player, get_pcvar_num(cvar_noclip))
}


lashsh 06-12-2010 05:02

Re: [ZP] Extra item ghost
 
1 Attachment(s)
thanks.


Please model the

Oneshox 06-12-2010 05:14

Re: [ZP] Extra item ghost
 
sorry, here
Code:

#include <amxmodx>
#include <zombieplague>
#include <cstrike>
#include <fun>

new const Model[] = { "models/player/yourmodel/yourmodel.mdl" }
new g_item
new cvar_noclip, cvar_speed

public plugin_init()
{
        register_plugin("[ZP] Extra Item: Mochveneba", "0.1", "LaSsHhH") 
        g_item = zp_register_extra_item("Mochveneba", 133, ZP_TEAM_ANY)

        cvar_speed = register_cvar("zp_item_speed", "400") // here you can edit the max speed
        cvar_noclip = register_cvar("zp_item_noclip", "1") // 1 - enable / 2 - disable

}

public plugin_precache()
{
        precache_model(Model);
}

public zp_extra_item_selected(player, itemid)
{
        if (itemid == g_item)
        client_print(player, print_chat, "[ZP] Tqven iyidet mochveneba!")

        set_user_maxspeed(player, get_user_maxspeed(player) + get_pcvar_num(cvar_speed))
        set_user_noclip(player, get_pcvar_num(cvar_noclip))

        cs_set_user_model(player, Model)
}


lashsh 06-12-2010 05:16

Re: [ZP] Extra item ghost
 
Thank you very much

Oneshox 06-12-2010 05:24

Re: [ZP] Extra item ghost
 
does it work?

lashsh 06-12-2010 05:38

Re: [ZP] Extra item ghost
 
Model does not work: ((

lashsh 06-12-2010 05:40

Re: [ZP] Extra item ghost
 
PHP Code:

#include <amxmodx> 
#include <zombieplague> 
#include <cstrike>
#include <fun> 

new const Model[] = { "models/player/ghost/ghost.mdl" }
new 
g_item
new cvar_noclipcvar_speed

public plugin_init() 

    
register_plugin("[ZP] Extra Item: Mochveneba""0.1""LaSsHhH & Oneshox")  
    
g_item zp_register_extra_item("Mochveneba"1233ZP_TEAM_ANY

    
cvar_speed register_cvar("zp_item_speed""600"// here you can edit the max speed
    
cvar_noclip register_cvar("zp_item_noclip""1"// 1 - enable / 2 - disable



public 
plugin_precache()
{
    
precache_model(Model);
}

public 
zp_extra_item_selected(playeritemid

    if (
itemid == g_item
    
client_print(playerprint_chat"[ZP] Tqven iyidet mochveneba!")

    
set_user_maxspeed(playerget_user_maxspeed(player) + get_pcvar_num(cvar_speed))
    
set_user_noclip(playerget_pcvar_num(cvar_noclip))

    
cs_set_user_model(playerModel)




All times are GMT -4. The time now is 14:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.