Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

co jest nie tak?


  • Zamknięty Temat jest zamknięty
4 odpowiedzi w tym temacie

#1 BeNq!

    Początkujący

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:15
  • Lokalizacja:JA WIEM!
Offline

Napisano 24.09.2009 20:34

#include <amxmodx>
#include <amxmisc>
#include <fun>
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
#define PLUGIN "VIP part2"
#define VERSION "2.0v"
#define AUTHOR "Dunno"
#define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890
new round = 1
public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)   
    register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")
    register_logevent("logevent_Round_Start", 2, "1=Round_Start")
    register_clcmd("awp","HandleCmd")
        register_clcmd("sg550","HandleCmd")
        register_clcmd("g3sg1","HandleCmd")
        register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
        register_event("CurWeapon", "event_CurWeaponn", "be", "1=1")
        register_event("CurWeapon", "event_CurWeaponnn", "be", "1=1")
    register_clcmd("say /info","ShowMotd")
    maxplayers = get_maxplayers()
    gmsgSayText = get_user_msgid("SayText")
    register_clcmd("say", "handle_say")
    register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
    // Add your code here...
}
public logevent_Round_Start() {
    round++;
   
    new players[32], player, pnum;
    get_players(players, pnum, "a");
    for(new i = 0; i < pnum; i++)
    {
        player = players[i];
        set_user_gravity(player,1.0)
        if(get_user_flags(player) & ADMIN_LEVEL_H)
        {
            if(round > 3) Showrod(player)
        }
    }
}

public Showrod(id) {
    show_menu(id, Keysrod, "Wybiez za darmo bron!^nw1. M4a1+Deagle i HE ^nw2. AK-47+Deagle i HE^nw3. AWP+Deagle i HE^n0. Wyjdz^n", -1, "rod") // Display menu
}
public Pressedrod(id, key) {
    /* Menu:
    * VIP Menu
    * 1. M4A1+Deagle i HE
    * 2. AK47+Deagle i HE
    * 3. AWP+Deagle i HE
    * 0. Exit
    */
    switch (key) {
        case 0: {
            strip_user_weapons (id)
            give_item(id,"weapon_m4a1")
            give_item(id,"ammo_556nato")
            give_item(id,"ammo_556nato")
            give_item(id,"ammo_556nato")
            give_item(id,"weapon_deagle")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"weapon_knife")
            give_item(id,"weapon_hegrenade")
            client_print(id, print_center, "Zdobadz M4A1 + Deagle i HE")
        }
        case 1: {
            strip_user_weapons (id)
            give_item(id,"weapon_ak47")
            give_item(id,"ammo_762nato")
            give_item(id,"ammo_762nato")
            give_item(id,"ammo_762nato")
            give_item(id,"weapon_deagle")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"weapon_knife")
            give_item(id,"weapon_hegrenade")
            client_print(id, print_center, "Zdobadz AK-K4 + Deagle i HE")
                case 2: {
            strip_user_weapons (id)
            give_item(id,"weapon_awp")
            give_item(id,"ammo_762nato")
            give_item(id,"ammo_762nato")
            give_item(id,"ammo_762nato")
            give_item(id,"weapon_deagle")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"ammo_50ae")
            give_item(id,"weapon_knife")
            give_item(id,"weapon_hegrenade")
            client_print(id, print_center, "Zdobadz AWP + Deagle i HE")
        }
        case 9: { // 0
           
        }
    }
    return PLUGIN_CONTINUE
}

public HandleCmd(id){
    if(get_user_flags(id) & ADMIN_LEVEL_H)
        return PLUGIN_CONTINUE
    client_print(id, print_center, "VIP moze uzywac tylko AWP")
    return PLUGIN_HANDLED
}


public event_CurWeapon(id){
    if(read_data(2) == CSW_AWP){
        if(!(get_user_flags(id) & ADMIN_LEVEL_H)){
            client_print(id, print_center, "VIP moze uzywac tylko AWP")
            client_cmd(id, "drop")
        }
    }
}

public event_CurWeaponn(id){
    if(read_data(2) == CSW_SG550){
        if(!(get_user_flags(id) & ADMIN_LEVEL_H)){
            client_print(id, print_center, "VIP moze uzywac tylko AWP")
            client_cmd(id, "drop")
        }
    }
}

public event_CurWeaponnn(id){
    if(read_data(2) == CSW_G3SG1){
        if(!(get_user_flags(id) & ADMIN_LEVEL_H)){
            client_print(id, print_center, "VIP moze uzywac tylko AWP")
            client_cmd(id, "drop")
        }
    }
}

public ShowMotd(id)
{
 show_motd(id, "vip.txt")
}
public client_authorized(id)
{
 set_task(30.0, "PrintText" ,id)
}
public PrintText(id)
{
 ColorChat(id, print_chat, "^x03 Cs-Arena: ^x04 Wpisz ^x03 /info ^x04 aby dowiedziec sie jakie zaslugi posiada VIP.")
}

public handle_say(id) {
    new said[192]
    read_args(said,192)
    if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )
        set_task(0.1,"print_adminlist",id)
    return PLUGIN_CONTINUE
}

public print_adminlist(user)
{
    new adminnames[33][32]
    new message[256]
    new contactinfo[256], contact[112]
    new id, count, x, len
   
    for(id = 1 ; id <= maxplayers ; id++)
        if(is_user_connected(id))
            if(get_user_flags(id) & ADMIN_LEVEL_H)
                get_user_name(id, adminnames[count++], 31)

    len = format(message, 255, "%s Obecnie jest VIP: ",COLOR)
    if(count > 0) {
        for(x = 0 ; x < count ; x++) {
            len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
            if(len > 96 ) {
                print_message(user, message)
                len = format(message, 255, "%s ",COLOR)
            }
        }
        print_message(user, message)
    }
    else {
        len += format(message[len], 255-len, "Obecnie zaden VIP nie jest dostepny..")
        print_message(user, message)
    }
   
    get_cvar_string("amx_contactinfo", contact, 63)
    if(contact[0])  {
        format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
        print_message(user, contactinfo)
    }
}

print_message(id, msg[]) {
    message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
    write_byte(id)
    write_string(msg)
    message_end()
}

public client_connect(id)
{
     new name[32]
     get_user_info(id, "name", name, 31)
     if(get_user_flags(id) & ADMIN_LEVEL_H) {
     set_hudmessage(200, 0, 0, 0.05, 0.65, 2, 0.02, 30.0, 0.03, 0.3, 2)
     show_hudmessage(0, "Wbija do nas %s Posiada on VIP'a",name)
    }
}

mam plugin VIP przerobiłem go ale co jest nie tak ?
  • +
  • -
  • 0

#2 mikus

    Ekipa PGC

  • Użytkownik

Reputacja: 72
Pomocny

  • Postów:406
  • GG:
  • Steam:steam
  • Lokalizacja:Wola
Offline

Napisano 24.09.2009 20:57

#include <amxmodx>

#include <amxmisc>

#include <fun>

static const COLOR[] = "^x04" //green

static const CONTACT[] = ""

new maxplayers

new gmsgSayText

#define PLUGIN "VIP part2"

#define VERSION "2.0v"

#define AUTHOR "Dunno"

#define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890

new round = 1

public plugin_init() {

    register_plugin(PLUGIN, VERSION, AUTHOR)   

    register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")

    register_logevent("logevent_Round_Start", 2, "1=Round_Start")

    register_clcmd("awp","HandleCmd")

    register_clcmd("sg550","HandleCmd")

    register_clcmd("g3sg1","HandleCmd")

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

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

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

    register_clcmd("say /info","ShowMotd")

    maxplayers = get_maxplayers()

    gmsgSayText = get_user_msgid("SayText")

    register_clcmd("say", "handle_say")

    register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)

    // Add your code here...

}

public logevent_Round_Start() {

    round++;

   

    new players[32], player, pnum;

    get_players(players, pnum, "a");

    for(new i = 0; i < pnum; i++)

    {

        player = players[i];

        set_user_gravity(player,1.0)

        if(get_user_flags(player) & ADMIN_LEVEL_H)

        {

            if(round > 3) Showrod(player)

        }

    }

}



public Showrod(id) {

    show_menu(id, Keysrod, "Wybiez za darmo bron!^nw1. M4a1+Deagle i HE ^nw2. AK-47+Deagle i HE^nw3. AWP+Deagle i HE^n0. Wyjdz^n", -1, "rod") // Display menu

}

public Pressedrod(id, key) {

    /* Menu:

    * VIP Menu

    * 1. M4A1+Deagle i HE

    * 2. AK47+Deagle i HE

    * 3. AWP+Deagle i HE

    * 0. Exit

    */

    switch (key) {

        case 0: {

            strip_user_weapons (id)

            give_item(id,"weapon_m4a1")

            give_item(id,"ammo_556nato")

            give_item(id,"ammo_556nato")

            give_item(id,"ammo_556nato")

            give_item(id,"weapon_deagle")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"weapon_knife")

            give_item(id,"weapon_hegrenade")

            client_print(id, print_center, "Zdobadz M4A1 + Deagle i HE")

        }

        case 1: {

            strip_user_weapons (id)

            give_item(id,"weapon_ak47")

            give_item(id,"ammo_762nato")

            give_item(id,"ammo_762nato")

            give_item(id,"ammo_762nato")

            give_item(id,"weapon_deagle")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"weapon_knife")

            give_item(id,"weapon_hegrenade")

            client_print(id, print_center, "Zdobadz AK-K4 + Deagle i HE")

        }

        case 2: {

            strip_user_weapons (id)

            give_item(id,"weapon_awp")

            give_item(id,"ammo_762nato")

            give_item(id,"ammo_762nato")

            give_item(id,"ammo_762nato")

            give_item(id,"weapon_deagle")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"ammo_50ae")

            give_item(id,"weapon_knife")

            give_item(id,"weapon_hegrenade")

            client_print(id, print_center, "Zdobadz AWP + Deagle i HE")

        }

        case 9: { // 0

           

        }

    }

    return PLUGIN_CONTINUE

}



public HandleCmd(id){

    if(get_user_flags(id) & ADMIN_LEVEL_H)

        return PLUGIN_CONTINUE

    client_print(id, print_center, "VIP moze uzywac tylko AWP")

    return PLUGIN_HANDLED

}





public event_CurWeapon(id){

    if(read_data(2) == CSW_AWP){

        if(!(get_user_flags(id) & ADMIN_LEVEL_H)){

            client_print(id, print_center, "VIP moze uzywac tylko AWP")

            client_cmd(id, "drop")

        }

    }

}



public event_CurWeaponn(id){

    if(read_data(2) == CSW_SG550){

        if(!(get_user_flags(id) & ADMIN_LEVEL_H)){

            client_print(id, print_center, "VIP moze uzywac tylko AWP")

            client_cmd(id, "drop")

        }

    }

}



public event_CurWeaponnn(id){

    if(read_data(2) == CSW_G3SG1){

        if(!(get_user_flags(id) & ADMIN_LEVEL_H)){

            client_print(id, print_center, "VIP moze uzywac tylko AWP")

            client_cmd(id, "drop")

        }

    }

}



public ShowMotd(id)

{

 show_motd(id, "vip.txt")

}

public client_authorized(id)

{

 set_task(30.0, "PrintText" ,id)

}

public PrintText(id)

{

print_message(id,"^x03 Cs-Arena: ^x04 Wpisz ^x03 /info ^x04 aby dowiedziec sie jakie zaslugi posiada VIP.")

}



public handle_say(id) {

    new said[192]

    read_args(said,192)

    if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )

        set_task(0.1,"print_adminlist",id)

    return PLUGIN_CONTINUE

}



public print_adminlist(user)

{

    new adminnames[33][32]

    new message[256]

    new contactinfo[256], contact[112]

    new id, count, x, len

   

    for(id = 1 ; id <= maxplayers ; id++)

        if(is_user_connected(id))

            if(get_user_flags(id) & ADMIN_LEVEL_H)

                get_user_name(id, adminnames[count++], 31)



    len = format(message, 255, "%s Obecnie jest VIP: ",COLOR)

    if(count > 0) {

        for(x = 0 ; x < count ; x++) {

            len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")

            if(len > 96 ) {

                print_message(user, message)

                len = format(message, 255, "%s ",COLOR)

            }

        }

        print_message(user, message)

    }

    else {

        len += format(message[len], 255-len, "Obecnie zaden VIP nie jest dostepny..")

        print_message(user, message)

    }

   

    get_cvar_string("amx_contactinfo", contact, 63)

    if(contact[0])  {

        format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)

        print_message(user, contactinfo)

    }

}



print_message(id, msg[]) {

    message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)

    write_byte(id)

    write_string(msg)

    message_end()

}



public client_connect(id)

{

     new name[32]

     get_user_info(id, "name", name, 31)

     if(get_user_flags(id) & ADMIN_LEVEL_H) {

     set_hudmessage(200, 0, 0, 0.05, 0.65, 2, 0.02, 30.0, 0.03, 0.3, 2)

     show_hudmessage(0, "Wbija do nas %s Posiada on VIP'a",name)

    }

}

  • +
  • -
  • 0

#3 BeNq!

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:15
  • Lokalizacja:JA WIEM!
Offline

Napisano 24.09.2009 21:25

a przekomplikujesz mi bo sam wiesz ... ja nie mogę ;/ nie wiem dlaczego
  • +
  • -
  • 0

#4 mikus

    Ekipa PGC

  • Użytkownik

Reputacja: 72
Pomocny

  • Postów:406
  • GG:
  • Steam:steam
  • Lokalizacja:Wola
Offline

Napisano 24.09.2009 21:49

Proszę, załącznik :)

Załączone pliki

  • Załączony plik  vip.amxx   9,32 KB  14 Ilość pobrań

  • +
  • -
  • 0

#5 BeNq!

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:15
  • Lokalizacja:JA WIEM!
Offline

Napisano 25.09.2009 13:28

Dziękuje bardzo :) działa w razie czego to jeszcze coś napiszę
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych