Raised This Month: $ Target: $400
 0% 

Night and day + Vote + Fastskychange 1.1!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 03-05-2006 , 21:01  
Reply With Quote #11

Quote:
Originally Posted by starwarsfan2001
I tried to compile the sma-file to a amxx-file but it doens't worked
4 Errors came. When I tried the amx- or amxx-file from this site the following message came:

Code:
Plugin failed to compile! Please try contacting the author.
Welcome to the AMX Mod X 1.70-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

/home/users/amxmodx/public_html/forums/files/night_day_199.sma(82) : warning 211: possibly unintended assignment
/home/users/amxmodx/public_html/forums/files/night_day_199.sma(82) : error 029: invalid expression, assumed zero
/home/users/amxmodx/public_html/forums/files/night_day_199.sma(82) : warning 215: expression has no effect
/home/users/amxmodx/public_html/forums/files/night_day_199.sma(82) : error 001: expected token: ";", but found ")"
/home/users/amxmodx/public_html/forums/files/night_day_199.sma(82) : error 029: invalid expression, assumed zero
/home/users/amxmodx/public_html/forums/files/night_day_199.sma(82) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
Could not locate output file /home/groups/amxmodx/public_html/compiled3/night_day_199.amx (compile failed).
This compiles, I dunno if it works:

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #define VOTETIME 75.0 //time after map starts when the vote begins new normalsky[64]; new choice[2] new is = 1 new was = 1 new reconnect = 0 public client_putinserver() { // This is to fix the engine bug in amxx 1.60 you can delete this if your running 1.65     if(get_cvar_num("sv_daynight") == 1)         {         if(is == 1)             {             set_lights("#OFF")         }         else         {             set_lights("b")         }     } } public plugin_init() {     register_logevent("reconnectplayers",2,"0=World triggered","1=Round_Start")     get_cvar_string("sv_skyname" , normalsky , 63);     is = 1     was = is     register_plugin("daynight","1.00","NL)Ramon(NL")     register_cvar("sv_daynight", "1")     register_concmd("amx_voteday","votedaynow", ADMIN_BAN," : <0 or 1> 1 = day 2 = night")     register_menucmd(register_menuid("menu_1"),(1<<0)|(1<<1),"count_votes")     set_task(VOTETIME,"voteday") } public plugin_precache() {     precache_generic("gfx/env/spacert.tga")     precache_generic("gfx/env/spacelf.tga")     precache_generic("gfx/env/spaceft.tga")     precache_generic("gfx/env/spacedn.tga")     precache_generic("gfx/env/spacebk.tga")     precache_generic("gfx/env/spaceup.tga") } public votedaynow(id,level,cid) {     if (get_cvar_num("sv_daynight") == 1)         {         if (!cmd_access(id,level,cid,1)) {             return PLUGIN_HANDLED         }         voteday()         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED } public voteday() {     if (get_cvar_num("sv_daynight") == 1)         {         show_menu(0,(1<<0)|(1<<1), "Do you want day or night modus^n^n1: Day^n2: Night", 15, "menu_1") // Display menu         set_task(15.0,"check_the_votes")         choice[0] = 0         choice[1] = 0         return PLUGIN_HANDLED         }     return PLUGIN_CONTINUE } public count_votes(id,key){     new name[32]     get_user_name(id,name,31)     new what[6] = "day"     if (key == 1) what = "night"     client_print(0,print_chat,"* %s voted %s", name, what)     ++choice[key]     return PLUGIN_HANDLED } public check_the_votes(id){     if (choice[0] >= choice[1]){         set_cvar_string("sv_skyname" , normalsky);         client_print(0,print_chat,"* Day mode on. (Day ^"%d^") (Night ^"%d^"). *",choice[0],choice[1])         set_lights("#OFF")         is = 1         checkclient()         } else {         server_cmd("sv_skyname space")         client_print(0,print_chat,"* Night mode on. (Day ^"%d^") (Night ^"%d^"). *",choice[0],choice[1])         set_lights("b")         is = 0         checkclient()     }     return PLUGIN_CONTINUE } public checkclient(){     if (is == was)         {         return PLUGIN_HANDLED     }     else     {         client_print(0,print_chat,"Reconnecting all players on next round seconds to change sky")         was = is         reconnect = 1     }     return PLUGIN_CONTINUE } public reconnectplayers() {     if (reconnect == 1)         {         reconnect = 0         client_cmd(0,"reconnect")     } }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode