1. Mam własnego moda, napisanego przez znajomego, cos jak Knife DM, tyle że troszke inne (Na PW moge dać plik SMA)
2. Vip był generowany przez VIP generatora czyli powinno byc wszystko ok z VIPEM ale podam SMA :
#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#define FL_ONGROUND (1<<9)
#define FL_WATERJUMP (1<<11)
#define g_Buffer 1536
forward amxbans_admin_connect(id);
new Array:g_Array, bool:g_Vip[33], g_Hudmsg, skoki[33];
new const g_Langcmd[][]={"say /vips","say_team /vips","say /vipy","say_team /vipy"};
new const g_Prefix[] = "Vip Chat";
public plugin_init(){
register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill");
register_forward(FM_CmdStart, "CmdStartPre");
RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
register_event("DeathMsg", "DeathMsg", "a");
register_message(get_user_msgid("ScoreAttrib"), "VipStatus");
g_Array=ArrayCreate(64,32);
for(new i;i<sizeof g_Langcmd;i++){
register_clcmd(g_Langcmd[i], "ShowVips");
}
register_clcmd("say /vip", "ShowMotd");
register_clcmd("say_team", "VipChat");
g_Hudmsg=CreateHudSyncObj();
}
public client_authorized(id){
if(get_user_flags(id) & 131072 == 131072){
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 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;
new g_Model[64];
formatex(g_Model,charsmax(g_Model),"%s",get_user_team(id) == 1 ? "VipTT" : "VipCT");
cs_set_user_model(id,g_Model);
}
public DeathMsg(){
new killer=read_data(1);
new victim=read_data(2);
if(is_user_alive(killer) && g_Vip[killer] && get_user_team(killer) != get_user_team(victim)){
DeathMsgVip(killer,victim,read_data(3));
}
}
public DeathMsgVip(kid,vid,hs){
set_user_health(kid, min(get_user_health(kid)+(hs?15:10),130));
}
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);
ShowVipsMotd(id);
return PLUGIN_CONTINUE;
}
public ShowVipsMotd(id){
new Data[g_Buffer],Len,g_Name[64];
Len = formatex(Data[Len], g_Buffer - Len, "<html><body bgcolor=Black><br>");
Len += formatex(Data[Len], g_Buffer - Len, "<center><table frame=^"border^" width=^"600^" cellspacing=^"0^" bordercolor=#4A4344 style=^"color:#56A5EC;text-align:center;^">");
Len += formatex(Data[Len], g_Buffer- Len, "<tr><td><b>#</b></td><td><b>Nick</b></td></td></tr>");
new g_Size=ArraySize(g_Array);
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
Len += formatex(Data[Len], g_Buffer - Len, "<tr>");
Len += formatex(Data[Len], g_Buffer - Len, "<td><font color=Red>%d</font></td>", i + 1);
Len += formatex(Data[Len], g_Buffer - Len, "<td>%s</td>", g_Name);
Len += formatex(Data[Len], g_Buffer - Len, "</tr>");
}
Len += formatex(Data[Len],g_Buffer - Len,"</center></body></html>");
show_motd(id, Data, "Vipy Online");
}
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 VipChat(id){
if(g_Vip[id]){
new g_Msg[256],
g_Text[256];
read_args(g_Msg,charsmax(g_Msg));
remove_quotes(g_Msg);
if(g_Msg[0] == '*' && g_Msg[1]){
new g_Name[64];
get_user_name(id,g_Name,charsmax(g_Name));
formatex(g_Text,charsmax(g_Text),"^x01(%s) ^x03%s : ^x04%s",g_Prefix, g_Name, g_Msg[1]);
for(new i=1;i<33;i++){
if(is_user_connected(i) && g_Vip[i])
ColorChat(i, GREEN, "%s", g_Text);
}
return PLUGIN_HANDLED_MAIN;
}
}
return PLUGIN_CONTINUE;
}
public plugin_precache(){
precache_model("models/player/VipCT/VipCT.mdl");
precache_model("models/player/VipTT/VipTT.mdl");
}
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);
}
Dodam że nazwy modeli VipTT są poprawne więc powinno odtwarzać a mimo to tego nie robi