Deathrun vip plugin eroare compilare

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
JigSaw;xx
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 05 Dec 2019, 17:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 2 times

21 Dec 2019, 12:11

Am un plugin de pe net care am incercat sa-l fac dupa bunul meu plac dar imi da aceasta eroare:
| Afiseaza codul
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(296) : error 049: invalid line continuation
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(303) : error 055: start of function body without function header
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(317) : error 049: invalid line continuation
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(320) : error 055: start of function body without function header
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(323) : error 010: invalid function or declaration
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(334) : error 036: empty statement
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(335) : warning 217: loose indentation
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(337) : warning 217: loose indentation
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(337) : error 017: undefined symbol "userTeam"
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(337) : error 036: empty statement
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(338) : warning 217: loose indentation
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(340) : error 010: invalid function or declaration
// C:\Users\Mario-PC\Desktop\Folder nou\DeathrunVip.sma(345) : error 010: invalid function or declaration
//

Sursa:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1

#define PLUGIN "Deathrun VIP"
#define VERSION "0.2"
#define AUTHOR "JigSaw"

#define ACCES ADMIN_LEVEL_H // Aici schimbati accesul

new g_ScoreAttrib;
new cvar_speed, cvar_gravity, cvar_hp, cvar_ap;
new Has_Speed[33];
new Has_Chose [ 33 ];

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR);

cvar_gravity = register_cvar("vip_gravity", "400");
cvar_speed = register_cvar("vip_speed", "1500");
cvar_hp = register_cvar("vip_hp", "1000");
cvar_hp = register_cvar("vip_ap", "100");

RegisterHam(Ham_Spawn, "player", "PlayerSpawm");

register_clcmd("say /vmenu", "drvip_menu");
register_clcmd("say_team /vmenu", "drvip_menu");
register_clcmd ("say /vip" , "wantvip" , -1);
register_clcmd ("say_team /vip" , "wantvip" , -1);
register_clcmd("say", "handle_say");
register_clcmd("say_team", "handle_say");

register_event( "CurWeapon", "CurWeapon", "be", "1=1" );
}

public CurWeapon( id )
{
if( Has_Speed[ id ] )
{
set_user_maxspeed( id, get_pcvar_float( cvar_speed ) );
}
}

public PlayerSpawm(id) {

new iPlayers [ 32 ];
new iNum;

get_players ( iPlayers, iNum );

for ( new i = 0; i < iNum; i++ )
{
Has_Chose [ iPlayers [ i ] ] = 0;
}

if(!is_user_alive(id))
return 1;

if(get_user_flags(id) & ACCES)
{
new CsTeams:team = cs_get_user_team(id);
switch(team)
{
case CS_TEAM_T:
{

set_user_health(id, get_pcvar_num(cvar_hp));
set_user_armor(id, get_pcvar_num(cvar_ap));
set_user_scoreattrib(id, 4);
Has_Speed[id] = false;

}
case CS_TEAM_CT:
{
strip_user_weapons(id);
set_user_health(id, get_pcvar_num(cvar_hp));
set_user_armor(id, get_pcvar_num(cvar_ap));
give_item(id, "weapon_usp");
cs_set_user_bpammo(id, CSW_USP, 100);
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
set_user_scoreattrib(id, 4);
Has_Speed[id] = false;
}
}
}
return 1;

}

public drvip_menu(id){

if ( Has_Chose [ id ] == 1 ) {
ColorChat( id, "^x01Ai folosit deja ^x04meniul ." );
}


if(get_user_team(id) == 1)
{
ColorChat(id, "^x01Doar^x04 CT^x01 pot folosi meniul");
return 1;
}

if(get_user_flags(id) & ACCES)
{
new menu = menu_create("\y---== [ \rVIP Menu \y] ==---", "drvip_handler");

menu_additem(menu, "\y[\w*\y] \rAk47 \w+ \rM4a1 \w+ \yDeagler", "1", 0);
menu_additem(menu, "\y[\w*\y] \rRifles \y(Arme Tari)", "2", 0);
menu_additem(menu, "\y[\w*\y] \rAparatoare \y(Shields)", "3", 0);
menu_additem(menu, "\y[\w*\y] \rViteza", "4", 0);
menu_additem(menu, "\y[\w*\y] \rGravitate", "5", 0);
menu_additem(menu, "\y[\w*\y] \rViata", "6", 0);

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
else
{
ColorChat(id, "^x01Doar^x04 VIP^x01 pot folosi meniul");
return 1;
}

return 1;
}

public drvip_handler(id, menu, item){

if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);

new key = str_to_num(data);
switch(key)
{
case 1:
{
give_item(id, "weapon_ak47");
give_item(id, "weapon_m4a1");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_AK47, 90);
cs_set_user_bpammo(id, CSW_M4A1, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 32);
ColorChat(id, "^x01Ai primit %i ^x04Ak47 + M4a1 + Deagle");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 2:
{
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 250);
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 250);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 250);
give_item(id, "weapon_famas");
cs_set_user_bpammo(id, CSW_FAMAS, 250);
give_item(id, "weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 250);
give_item(id, "weapon_mp5navy");
cs_set_user_bpammo(id, CSW_MP5NAVY, 250);
give_item(id, "weapon_ump45"); 
cs_set_user_bpammo(id, CSW_UMP45, 250);
give_item(id, "weapon_galil");
cs_set_user_bpammo(id, CSW_GALIL, 250);
give_item(id, "weapon_scout");
cs_set_user_bpammo(id, CSW_SCOUT, 250);
give_item(id, "weapon_aug");
cs_set_user_bpammo(id, CSW_AUG, 250);
give_item(id, "weapon_sg550");
cs_set_user_bpammo(id, CSW_SG550, 250 );
ColorChat(id, "^x01Ai primit %i ^x04Rifles.");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 3:
{
give_item(id,"weapon_shield");
ColorChat(id, "^x01Ai primit %i ^x04Shield");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 4:
{
set_user_maxspeed(id, get_pcvar_float(cvar_speed));
ColorChat(id, "^x01Ai primit %i ^x04Speed");
Has_Speed[id] = true;
Has_Chose[id] ++;
}
case 5:
{
set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800);
ColorChat(id, "^x01Ai primit ^x04Gravity");
Has_Speed[id] = false;
Has_Chose[id] ++;
}
case 6:
{
set_user_health(id, get_user_health(id) + 500);
ColorChat(id, "^x01Ai primit ^x04Viata");
Has_Speed[id] = false;
Has_Chose[id] ++;
}      
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}

public print_adminlist(user) {
new adminnames[33][32];
new message[256];
new id, count, x, len;

for(id = 1 ; id <= get_maxplayers() ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ACCES)
get_user_name(id, adminnames[count++], 31);

len = format(message, 255, "^x04 VIP ONLINE: ");
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
if(len > 96) {
print_message(user, message);
len = format(message, 255, "^x04 ");
}
}
print_message(user, message);
}
else {
len += format(message[len], 255-len, "No VIP online.");
print_message(user, message);
}
}
print_message(id, msg[]) {
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
write_byte(id);
write_string(msg);
message_end();
}

public handle_say(id) {
new said[192];
read_args(said,192);
if(contain(said, "/vips") != -1)
set_task(0.1,"print_adminlist",id);
return PLUGIN_CONTINUE;
}

public wantvip(id) show_motd(id,"/addons/amxmodx/configs/vip.html");

stock set_user_scoreattrib(id, attrib = 0){
message_begin(MSG_BROADCAST, g_ScoreAttrib, _, 0);
write_byte(id);
write_byte(attrib);
message_end( );
}

stock ColorChat(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);

replace_all(msg, 190, "^x04", "^4");
replace_all(msg, 190, "^x01", "^1");
replace_all(msg, 190, "^x03", "^3");

if(id) players[0] = id;
else get_players(players, count, "ch"); {
for(new i = 0; i < count; i++) {
if(is_user_connected(players)) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
write_byte(players);
write_string(msg);
message_end();
}
}
}
}

//==========VIP|TAB==========\\
//===========================\\
#include < amxmodx >
#define ADMIN_VIP ADMIN_RESERVATION
#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP  ( 1 << 2 )

{
    register_plugin( "VIP Admin", "0.0.1", "Exolent" );
    register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
}
public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
    new iPlayer = get_msg_arg_int( 1 );
    if( is_user_connected( iPlayer )
    && ( get_user_flags( iPlayer ) & ADMIN_VIP ) ) {
        set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
    }
}

//==========VipModel==========\\
//============================\\
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
{
        register_plugin("AMX_M_VIP", "2.0", "MrPower");
        register_event("ResetHUD", "resetModel", "b");
        return PLUGIN_CONTINUE;
}
public plugin_precache() {
        precache_model("models/player/vip_te/vip_te.mdl");
        precache_model("models/player/vip_ct/vip_ct.mdl");
        return PLUGIN_CONTINUE;
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
                new CsTeams:userTeam = cs_get_user_team(id);
                if (userTeam == CS_TEAM_T);
                        cs_set_user_model(id, "vip_te");
}
else if(userTeam == CS_TEAM_CT);
cs_set_user_model(id, "vip_ct");
}
                else {
                        cs_reset_user_model(id);
                }
        }

        return PLUGIN_CONTINUE;
}

Multumesc!
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2394
Joined: 10 Jul 2013, 20:26
Detinator Steam: Nu
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 16 times
Been thanked: 40 times
Contact:

21 Dec 2019, 14:29

separa cele 3 pluginuri si nu o sa ai probleme la compilare
no...
User avatar
JigSaw;xx
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 05 Dec 2019, 17:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 2 times

21 Dec 2019, 17:43

Laurentiu P. wrote:
21 Dec 2019, 14:29
separa cele 3 pluginuri si nu o sa ai probleme la compilare
Dar eu vreau un plugin care sa faca aceste trei lucruri...
Last edited by L E V I N on 21 Dec 2019, 19:40, edited 1 time in total.
Reason: patetic să faci sma da să nu știi să cpmpilezi
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest