AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need help (https://forums.alliedmods.net/showthread.php?t=13603)

Ares0016 05-22-2005 12:08

I need help
 
i need help ..
my plugin seems to be working exept it doesn't it says that command not valid
Code:
Code:

#include <amxmodx>
//Credit goes to SnipaJ for my resorce
public plugin_init() {
  register_plugin("Colored NVG","1.0","TM16GODS")
  register_clcmd("amx_nvgblue","nvgblue")
  register_clcmd("amx_nvggreen","nvggreen")
  register_clcmd("amx_nvgred","nvgred")
  register_clcmd("amx_nvgpurple","nvgpurple")
  register_clcmd("amx_nvgyellow","nvgyellow")
  register_clcmd("amx_nvgorange","nvgorange")
  register_clcmd("amx_nvggold","nvggold")
}

public nvgblue(id) {
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    write_short(1000) // fade lasts this long duration
    write_short(1000) // fade lasts this long hold time
    write_short(1<<12) // fade type (in / out)
    write_byte(0) // fade red
    write_byte(0) // fade green
    write_byte(255) // fade blue
    write_byte(150) // fade alpha
    message_end()
    return PLUGIN_HANDLED
}

public nvggreenid) {
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    write_short(1000) // fade lasts this long duration
    write_short(1000) // fade lasts this long hold time
    write_short(1<<12) // fade type (in / out)
    write_byte(0) // fade red
    write_byte(255) // fade green
    write_byte(0) // fade blue
    write_byte(150) // fade alpha
    message_end()
    return PLUGIN_HANDLED
}

public nvgred(id) {
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    write_short(1000) // fade lasts this long duration
    write_short(1000) // fade lasts this long hold time
    write_short(1<<12) // fade type (in / out)
    write_byte(255) // fade red
    write_byte(0) // fade green
    write_byte(0) // fade blue
    write_byte(150) // fade alpha
    message_end()
    return PLUGIN_HANDLED
}

public nvgpurple(id) {
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    write_short(1000) // fade lasts this long duration
    write_short(1000) // fade lasts this long hold time
    write_short(1<<12) // fade type (in / out)
    write_byte(255) // fade red
    write_byte(0) // fade green
    write_byte(255) // fade blue
    write_byte(150) // fade alpha
    message_end()
    return PLUGIN_HANDLED
}

public nvgyellow(id) {
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    write_short(1000) // fade lasts this long duration
    write_short(1000) // fade lasts this long hold time
    write_short(1<<12) // fade type (in / out)
    write_byte(255) // fade red
    write_byte(255) // fade green
    write_byte(0) // fade blue
    write_byte(150) // fade alpha
    message_end()
    return PLUGIN_HANDLED
}

public nvgorange(id) {
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    write_short(1000) // fade lasts this long duration
    write_short(1000) // fade lasts this long hold time
    write_short(1<<12) // fade type (in / out)
    write_byte(255) // fade red
    write_byte(125) // fade green
    write_byte(0) // fade blue
    write_byte(150) // fade alpha
    message_end()
    return PLUGIN_HANDLED
}

public nvggold(id) {
    message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    write_short(1000) // fade lasts this long duration
    write_short(1000) // fade lasts this long hold time
    write_short(1<<12) // fade type (in / out)
    write_byte(155) // fade red
    write_byte(125) // fade green
    write_byte(0) // fade blue
    write_byte(150) // fade alpha
    message_end()
    return PLUGIN_HANDLED
}


v3x 05-22-2005 12:32

Code:
public nvggreenid) {
Is your problem.

Ares0016 06-04-2005 01:22

Thanks but theres still one more problem
 
first of all i want to thank you
i have been busy with school so i did not check this.

I came acrossed 1 problem
the nvg to stay on

could u or someone else who reads this plz help me
PS: could i make it so when u turn on regular nvg it activates it
this of corse after the person types the command

I like the help thanks.


All times are GMT -4. The time now is 16:41.

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