Chciałbym, aby ktoś przerobił dla mnie tego VIPA.
Chodzi o to, aby zostać te 1000$ , ale dodać do niego darmowy kevlar+helm, deagla+ammo,oraz 2xflesh+smoke.
Poniżej daje KOD już vipa, starczy tylko dodać.
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
static const COLOR[] = "^x04" //green
new maxplayers
new gmsgSayText
public plugin_init()
{
register_plugin("VIP", "1.04", "XvAK")
register_clcmd("say /kupvipa","ShowMotd")
register_clcmd("say /kupvip","ShowMotd")
register_clcmd("say_team /kupvipa","ShowMotd")
register_clcmd("say_team /kupvip","ShowMotd")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_logevent("Poczatek_Rundy", 2, "1=Round_Start")
}
public Poczatek_Rundy() {
new players[32], player, pnum;
get_players(players, pnum, "a");
for(new i = 0; i < pnum; i++)
{
player = players[i];
if(get_user_flags(player) & ADMIN_LEVEL_H)
{
cs_set_user_money(player,cs_get_user_money(player) + 1000)
client_print(player, print_chat, "[VIP] Jako gracz VIP otrzymujesz 1000$.")
}
}
return PLUGIN_HANDLED
}
public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public client_authorized(id)
{
set_task(30.0, "PrintText" ,id)
set_task(120.0, "PrintTextX" ,id)
}
public PrintText(id)
{
client_print(id, print_chat, "[VIP] Wpisz /kupvipa aby zobaczyc wiecej informacji.")
}
public PrintTextX(id)
{
client_print(id, print_chat, "[VIP] Wpisz /vip aby zobaczyc liste VIPow.")
}
public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vip") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
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 VIP ONLINE: ",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, "Brak VIPow na serwerze.")
print_message(user, message)
}
}
print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
} W zamian za wykonanie oferuję vipa na serwerze bf2 lub zapłate, ale zależy mi na czasie.
Pozdrawiam


Dodatki SourceMod



Temat jest zamknięty










