Wystarczy użyć VIP GENERATORA:
Vip jest na flagę f
Ustawione:
200 HP
2 dodatkowe skoki
1 HE, 1 SG oraz 2 FB
Pokazuje vipy na komendę /vips
Status VIP w tabeli graczy (żywi TT nie widzą tego statusu u terrorystów)
Informacje o vipie w motd (komenda /vip) - Informacja co 30 sekund na czacie: Chcesz dowiedziec sie co posiada vip ? Napisz na say'u /vip
Przywitanie gdy VIP wchodzi na serwer
Auto bunnyhop (skakanie na spacji cały czas bez klikania)
Szybszy bieg
Tutaj masz kod który skompilujesz w kompilatorze w menu dodatki na górze forum: (kliknij w pokaż)
Spoiler
#include
#include
#include
#include
#include
#include
#include
#define FL_ONGROUND (1<<9)
#define FL_WATERJUMP (1<<11)
forward amxbans_admin_connect(id);
new Array:g_Array, bool:g_FreezeTime, bool:g_Vip[33], g_Hudmsg, skoki[33];
new const g_Langcmd[][]={"say /vips","say_team /vips","say /vipy","say_team /vipy"};
public plugin_init(){
register_plugin("VIP Ultimate", "12.1.0.2", "benio101 & speedkill");
RegisterHam(Ham_Item_PreFrame, "player", "fw_Player_ResetMaxSpeed", 1);
register_logevent("logevent_round_start", 2, "1=Round_Start");
register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
register_forward(FM_CmdStart, "CmdStartPre");
RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
register_message(get_user_msgid("ScoreAttrib"), "VipStatus");
g_Array=ArrayCreate(64,32);
for(new i;i register_clcmd(g_Langcmd[i], "ShowVips");
}
register_clcmd("say /vip", "ShowMotd");
set_task(30.0, "ShowAdv",.flags = "b");
g_Hudmsg=CreateHudSyncObj();
}
public client_authorized(id){
if(get_user_flags(id) & 524288 == 524288){
client_authorized_vip(id);
}
}
public client_authorized_vip(id){
g_Vip[id]=true;
new g_Name[64];
get_user_name(id,g_Name,charsmax(g_Name));
new g_Size = ArraySize(g_Array);
new szName[64];
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, szName, charsmax(szName));
if(equal(g_Name, szName)){
return 0;
}
}
ArrayPushString(g_Array,g_Name);
set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0);
ShowSyncHudMsg(0, g_Hudmsg, "Vip %s wbija na serwer !",g_Name);
return PLUGIN_CONTINUE;
}
public client_disconnect(id){
if(g_Vip[id]){
client_disconnect_vip(id);
}
}
public client_disconnect_vip(id){
g_Vip[id]=false;
new Name[64];
get_user_name(id,Name,charsmax(Name));
new g_Size = ArraySize(g_Array);
new g_Name[64];
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
if(equal(g_Name,Name)){
ArrayDeleteItem(g_Array,i);
break;
}
}
}
public fw_Player_ResetMaxSpeed(id){
if(g_Vip[id]){
if(is_user_alive(id)){
fw_Player_ResetMaxSpeedVip(id);
}
}
}
public logevent_round_start(){
g_FreezeTime=false;
}
public event_new_round(){
g_FreezeTime=true;
}
public fw_Player_ResetMaxSpeedVip(id){
if(!g_FreezeTime){
set_user_maxspeed(id,get_user_maxspeed(id) + 100);
}
}
public CmdStartPre(id, uc_handle){
if(g_Vip[id]){
if(is_user_alive(id)){
CmdStartPreVip(id, uc_handle);
}
}
}
public CmdStartPreVip(id, uc_handle){
new flags = pev(id, pev_flags);
if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){
--skoki[id];
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id,pev_velocity,velocity);
} else if(flags & FL_ONGROUND && skoki[id]!=-1){
skoki[id] = 2;
}
}
public SpawnedEventPre(id){
if(g_Vip[id]){
if(is_user_alive(id)){
SpawnedEventPreVip(id);
}
}
}
public SpawnedEventPreVip(id){
skoki[id]=2;
set_user_health(id, get_user_health(id)+100);
new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0);
give_item(id, "weapon_hegrenade");
++henum;
new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0);
give_item(id, "weapon_flashbang");
++fbnum;
cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0);
give_item(id, "weapon_smokegrenade");
++sgnum;
}
public VipStatus(){
new id=get_msg_arg_int(1);
if(is_user_alive(id) && g_Vip[id]){
set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);
}
}
public ShowVips(id){
new g_Name[64],g_Message[192];
new g_Size=ArraySize(g_Array);
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
add(g_Message, charsmax(g_Message), g_Name);
if(i == g_Size - 1){
add(g_Message, charsmax(g_Message), ".");
}
else{
add(g_Message, charsmax(g_Message), ", ");
}
}
ColorChat(id,GREEN,"^x03Vipy ^x04na ^x03serwerze: ^x04%s", g_Message);
return PLUGIN_CONTINUE;
}
public client_infochanged(id){
if(g_Vip[id]){
new szName[64];
get_user_info(id,"name",szName,charsmax(szName));
new Name[64];
get_user_name(id,Name,charsmax(Name));
if(!equal(szName,Name)){
ArrayPushString(g_Array,szName);
new g_Size=ArraySize(g_Array);
new g_Name[64];
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
if(equal(g_Name,Name)){
ArrayDeleteItem(g_Array,i);
break;
}
}
}
}
}
public plugin_end(){
ArrayDestroy(g_Array);
}
public ShowMotd(id){
show_motd(id, "vip.txt", "Informacje o vipie");
}
public ShowAdv(){
ColorChat(0, NORMAL, "[VIP]^x04 Chcesz dowiedziec sie co posiada vip ? Napisz na say'u /vip");
}
public client_PreThink(id){
if(g_Vip[id] && is_user_alive(id)){
client_PreThinkVip(id);
}
}
public client_PreThinkVip(id){
entity_set_float(id, EV_FL_fuser2, 0.0);
if(entity_get_int(id, EV_INT_button) & 2){
new flags = entity_get_int(id, EV_INT_flags);
if(flags & FL_WATERJUMP || entity_get_int(id, EV_INT_waterlevel) >= 2 || !(flags & FL_ONGROUND)){
return PLUGIN_CONTINUE;
}
new Float:velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
velocity[2] += 250.0;
entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6);
}
return PLUGIN_CONTINUE;
}
public amxbans_admin_connect(id){
client_authorized(id);
}