Skocz do zawartości

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

Problem z Pluginem (Vip) na DR


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

#1 adiii

    Pomocny

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:41
  • Imię:Lucek
  • Lokalizacja:Gdańsk
Offline

Napisano 11.04.2011 20:26

Witam mam ciężki problem z pluginem na Dr "VIP" Bo chce dodać speeda kiedy dodaję to nie mogę sma skompilować bo sa błędy .
chce aby ktoś mi przerobił ten plugin żeby Vip był pod flaga T i żeby nie mógł slapować,kickować,pisać na say (@@) i żeby TT nie miał wyglądy Smith'a . Ale żeby miał Większego speeda bo na razie ma tylko :
fm_give_item(id, "item_assaultsuit");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
cs_set_user_money(id, cs_get_user_money(id) + 500);
To jeszcze do tego ma dojść speed. I jak da rade to żeby Vip miał 80 HP i Kiedy wejdzie na serwer bedzie jego Nick w say pokazywany na zielono ale to nie musi być ZAPŁACĘ

Osoby używające więcej niż 3 wykrzykników lub pytajników to osoby z zaburzeniami własnej osobowości

Kod SMA:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME "vipas"
#define PLUGIN_AUTHOR "Kukulis"
#define PLUGIN_VERSION "0.1"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")

register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers()

return PLUGIN_CONTINUE

}

public plugin_precache() {
precache_model("models/player/smith/smith.mdl")
precache_model("models/player/smith/smith.mdl")

return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_CVAR) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "smith")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "smith")
}
else {
cs_reset_user_model(id)
}
}

return PLUGIN_CONTINUE
}


public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

client_print(id, print_chat, "[VIP] Write /vip To see the VIP privileges.")

if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return PLUGIN_CONTINUE;
}

public admin_motd(id,level,cid) {

if (!cmd_access(id,level,cid,1))
return PLUGIN_CONTINUE

show_motd(id,"vip.txt","VIP by Kukulis")
return PLUGIN_CONTINUE
}




public give_stuff(id)
{
if(!is_user_connected(id))
return;

fm_give_item(id, "item_assaultsuit");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
cs_set_user_money(id, cs_get_user_money(id) + 500);
}

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_viplist", id)
return PLUGIN_CONTINUE
}

public print_viplist(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_CVAR)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s Online 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, "No online VIP.")
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()
}





Moje GG:21196190 !!

Użytkownik adiii edytował ten post 11.04.2011 20:27

  • +
  • -
  • 0

#2 Kaster

    Wszechwidzący

  • Użytkownik

Reputacja: 32
Życzliwy

  • Postów:268
  • GG:
  • Imię:Kamil
  • Lokalizacja:Gliwice
Offline

Napisano 16.04.2011 19:36

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

#define PLUGIN_NAME "vipas"
#define PLUGIN_AUTHOR "Kukulis"
#define PLUGIN_VERSION "0.1"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")

register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers()

return PLUGIN_CONTINUE

}

public plugin_precache() {
precache_model("models/player/smith/smith.mdl")
precache_model("models/player/smith/smith.mdl")

return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_CVAR) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "smith")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "smith")
}
else {
cs_reset_user_model(id)
}
}

return PLUGIN_CONTINUE
}


public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

client_print(id, print_chat, "[VIP] Write /vip To see the VIP privileges.")

if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return PLUGIN_CONTINUE;
}

public admin_motd(id,level,cid) {

        if (!cmd_access(id,level,cid,1))
        return PLUGIN_CONTINUE
        
        show_motd(id,"vip.txt","VIP by Kukulis")
        return PLUGIN_CONTINUE   
}




public give_stuff(id)
{
if(!is_user_connected(id))
return;

   fm_give_item(id, "item_assaultsuit");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_hegrenade");
   fm_give_item(id, "weapon_smokegrenade");
   cs_set_user_money(id, cs_get_user_money(id) + 500); 
   set_user_maxspeed(id, 300);
}

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_viplist", id)
        return PLUGIN_CONTINUE
}

public print_viplist(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_CVAR)
                                get_user_name(id, adminnames[count++], 31)

        len = format(message, 255, "%s Online 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, "No online VIP.")
                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()
}


Sprawdź to jak nie będzie działać to napisz mi na PW ja teraz nie mam czasu sprawdzić czy działa, sorki. ;/
  • +
  • -
  • 0

#3 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 17.04.2011 07:30

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
AMX Mod X -> Problemy z pluginami
do
Scripting -> Pluginy


#4 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 17.04.2011 08:43

#include <amxmodx>

#include <fakemeta>

#include <fakemeta_util>

#include <hamsandwich>

#include <cstrike>

#include <amxmisc>

#include <fun>



#define PLUGIN_NAME "vipas"

#define PLUGIN_AUTHOR "Kukulis"

#define PLUGIN_VERSION "0.1"



static const COLOR[] = "^x04"

static const CONTACT[] = ""



new maxplayers

new gmsgSayText



public plugin_init()

{

register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);



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

RegisterHam(Ham_Spawn, "player", "model", 1);

register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")



register_clcmd("say", "handle_say")

register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)

gmsgSayText = get_user_msgid("SayText")



maxplayers = get_maxplayers()



}



public plugin_precache() {

precache_model("models/player/smith/smith.mdl")



}



public model(id)

{

if (get_user_flags(id) & ADMIN_LEVEL_H) 

{

if(cs_get_user_team(id) == CS_TEAM_CT)

{

cs_set_user_model(id, "smith")

}

}

}

public admin_motd(id)

{

show_motd(id,"vip.txt","VIP")  

}

public give_stuff(id)

{

if (get_user_flags(id) & ADMIN_LEVEL_H) 

{

fm_give_item(id, "item_assaultsuit");

fm_give_item(id, "weapon_flashbang");

fm_give_item(id, "weapon_flashbang");

fm_give_item(id, "weapon_hegrenade");

fm_give_item(id, "weapon_smokegrenade");

cs_set_user_money(id, cs_get_user_money(id) + 500); 

set_user_maxspeed( id , get_user_maxspeed( id ) + 200.0 ) 

}

}



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_viplist", id)

        return PLUGIN_CONTINUE

}



public print_viplist(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_CVAR)

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



        len = format(message, 255, "%s Online 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, "No online VIP.")

                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()

}

  • +
  • -
  • 0

If you can dream it, you can do it.





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

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