Mam problem z pluginem vip.amxx. Na początku tworzyłem VIP'a w generatorze, wgrałem na serwer to plugin nie wywala błędów ale tak jagby go nie było na serwerze.
Gdy ściągnąłem plugin od innego użytkownika (VIP z modelami) wgrałem ale bez modeli i plugin dopiero zaaragował tak, że serwer nie chciał się włączyć. Usunąłem linijke dotyczącą podmiany modeli VIP'a i jest tak samo jak w pierwszym przypadku. Plugin jest wgrany dobrze, ale jakby bo nie było. Proszę o pomoc.
vip.sma
#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <engine>
#include <fun>
#include <hamsandwich>
new bool:g_FreezeTime, bool:g_Vip[33], weapon_id;
new const g_Prefix[] = "Vip Chat";
public plugin_init(){
register_plugin("VIP Ultimate", "5.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");
RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
register_message(get_user_msgid("ScoreAttrib"), "g_VipStatus");
register_clcmd("say /vip", "g_ShowMotd");
register_clcmd("say_team", "g_Chat");
register_message(get_user_msgid("SayText"),"handleSayText");
}
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));
set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0);
show_hudmessage(0, "Vip %s wbija na serwer !",g_Name);
}
public client_disconnect(id){
if(g_Vip[id]){
client_disconnect_vip(id);
}
}
public client_disconnect_vip(id){
g_Vip[id]=false;
}
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) + 300);
}
}
public SpawnedEventPre(id){
if(g_Vip[id]){
if(is_user_alive(id)){
SpawnedEventPreVip(id);
}
}
}
public SpawnedEventPreVip(id){
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
cs_set_user_bpammo(id, CSW_FLASHBANG,2);
give_item(id, "weapon_smokegrenade");
new g_Model[64];
cs_set_user_model(id,g_Model);
if(get_user_team(id)%3){
give_item(id, "weapon_p90");
give_item(id, "ammo_57mm");
weapon_id=find_ent_by_owner(-1, "weapon_p90", id);
if(weapon_id)cs_set_weapon_ammo(weapon_id, 50);
cs_set_user_bpammo(id, CSW_P90, 150);
}
if(get_user_team(id)%2){
give_item(id, "item_thighpack");
}
}
public g_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 g_ShowMotd(id){
if(is_user_connected(id))
show_motd(id, "vip.txt", "Informacje o vipie");
}
public g_Chat(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]){
replace(g_Msg,charsmax(g_Msg),"*","");
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);
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 handleSayText(msgId,msgDest,msgEnt){
new id = get_msg_arg_int(1);
if(is_user_connected(id) && g_Vip[id]){
new szTmp[256],szTmp2[256];
get_msg_arg_string(2,szTmp, charsmax(szTmp))
new szPrefix[64] = "^x04[VIP]";
if(!equal(szTmp,"#Cstrike_Chat_All")){
add(szTmp2,charsmax(szTmp2),szPrefix);
add(szTmp2,charsmax(szTmp2)," ");
add(szTmp2,charsmax(szTmp2),szTmp);
}
else{
add(szTmp2,charsmax(szTmp2),szPrefix);
add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 : %s2");
}
set_msg_arg_string(2,szTmp2);
}
return PLUGIN_CONTINUE;
}
plugins.ini
; AMX Mod X plugins
vip.amxx
players_models.amxx
; Admin Base - Always one has to be activated
admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; Basic
admincmd.amxx ; basic admin console commands
adminhelp.amxx ; help command for admin console commands
adminslots.amxx ; slot reservation
multilingual.amxx ; Multi-Lingual management
; Menus
menufront.amxx ; front-end for admin menus
cmdmenu.amxx ; command menu (speech, settings)
plmenu.amxx ; players menu (kick, ban, client cmds.)
;telemenu.amxx ; teleport menu (Fun Module required!)
mapsmenu.amxx ; maps menu (vote, changelevel)
pluginmenu.amxx ; Menus for commands/cvars organized by plugin
; Chat / Messages
adminchat.amxx ; console chat commands
antiflood.amxx ; prevent clients from chat-flooding the server
scrollmsg.amxx ; displays a scrolling message
imessage.amxx ; displays information messages
adminvote.amxx ; vote commands
; Map related
;nextmap.amxx ; displays next map in mapcycle
;mapchooser.amxx ; allows to vote for next map
timeleft.amxx ; displays time left on map
; Configuration
pausecfg.amxx ; allows to pause and unpause some plugins
statscfg.amxx ; allows to manage stats plugins via menu and commands
; Counter-Strike
;restmenu.amxx ; restrict weapons menu
statsx.amxx ; stats on death or round end (CSX Module required!)
;miscstats.amxx ; bunch of events announcement for Counter-Strike
;stats_logging.amxx ; weapons stats logging (CSX Module required!)
; Enable to use AMX Mod plugins
;amxmod_compat.amxx ; AMX Mod backwards compatibility layer
; TUTAJ dopisuj samodzielnie zainstalowane pluginy:
; +---------------------------------------------------------------------------+
; | W Panelu Administracyjnym mozesz zainstalowac dodatkowe pluginy. -==- |
; | Prosimy aby zainstalowane "recznie" pluginy dopisywac powyzej tej tabeli! |
; +---------------------------------------------------------------------------+
; Pluginy zainstalowane z poziomu panelu:
paintballgun.amxx
paintballmod.amxx
paintballnade.amxx
ranga.amxx
rangi.amxx
parachute.amxx
ad_manager.amxx
sklep.amxx
RoundSound.amxx
c4.amxx
spree.amxx
bad_camper.amxx
galileo.amxx
ptb.amxx