Teraz na serio się wziąłem i muszę skończyć ten plugin, więc mówcie co poprawić
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define PLUGIN "VIP" #define VERSION "0.1" #define AUTHOR "Grafer" new cvar_enable public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /vip", "vip") register_event("TeamInfo","team_assign","a") cvar_enable = register_cvar("vip_enable", "1") } public plugin_precache() { precache_model("models/player/vipct/vipct.mdl") precache_model("models/player/viptt/viptt.mdl") } public vip(id) { new players[32], id, pnum; get_players(players, pnum, "a"); for(new i = 0; i < pnum; i++) { if( get_pcvar_num(cvar_enable) != 1 ) return; if( get_user_flags(id) & ADMIN_LEVEL_H) { set_user_health(i, 150) set_user_gravity(i, 0.75) set_user_armor(i, 150) set_user_maxspeed (i, 500.0 ) client_print(i, print_chat,"[HS.VIP] Masz już wszystkie swoje przywileje!") } } } public client_putinserver(id) { if( get_user_flags(id) & ADMIN_LEVEL_H) { new name[33]; get_user_name(id, name, 32); client_print(0,print_chat,"Przyszedl VIP - %s", name); } } public team_assign() { new id=read_data(1) if(get_user_flags(id) & ADMIN_LEVEL_H) { new team[32] read_data(2,team,31) if(team[0]=='T') cs_set_user_model(id,"viptt") else if(team[0]=='C') cs_set_user_model(id,"vipct") } }
bledy w kompilacji
home/groups/amxmodx/tmp3/textt45xES.sma(34) : warning 217: loose indentation /home/groups/amxmodx/tmp3/textt45xES.sma(36) : warning 213: tag mismatch /home/groups/amxmodx/tmp3/textt45xES.sma(38) : warning 213: tag mismatch /home/groups/amxmodx/tmp3/textt45xES.sma(44) : warning 217: loose indentation /home/groups/amxmodx/tmp3/textt45xES.sma(44) : error 029: invalid expression, assumed zero /home/groups/amxmodx/tmp3/textt45xES.sma(44) : error 004: function "client_putinserver" is not implemented /home/groups/amxmodx/tmp3/textt45xES.sma(49) : warning 217: loose indentation /home/groups/amxmodx/tmp3/textt45xES.sma(50) : warning 217: loose indentation /home/groups/amxmodx/tmp3/textt45xES.sma(54) : error 029: invalid expression, assumed zero /home/groups/amxmodx/tmp3/textt45xES.sma(54) : error 017: undefined symbol "team_assign" /home/groups/amxmodx/tmp3/textt45xES.sma(65) : error 001: expected token: "}", but found "-end of file-"