Raised This Month: $ Target: $400
 0% 

Ajust this plugin.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Raul3w
Member
Join Date: Apr 2017
Old 10-31-2017 , 09:05   Ajust this plugin.
Reply With Quote #1

Help me, ajust this plugin :

Could not locate output file /home/groups/amxmodx/public_html/websc3/textjj8zQR.amx (compile failed). with AMX MOD X.org

Quote:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < fakemeta >
#include < hamsandwich >
#include < engine >

static const PLUGIN [ ] = "[BB] Shop"
static const VERSIO [ ] = "1.5";
static const AUTHOR [ ] = "london";

// Human Stuff
new bool: UserHaveGalacticAK47 [ 33 ];
new bool: UserHaveGalacticM4A1 [ 33 ];
new Model [ 64 ] = "models/bb_cso/v_buff_ak47.mdl";
new Model [ 64 ] = "models/bb_cso/v_buff_m4a1.mdl";

new Seconds = 10;
new bool: GoodMode [ 33 ];


// Menu Sound
new const MenuSound [ ] = "sound/BaseBuilder/cash.wav";

public plugin_init ( )
{
register_plugin ( PLUGIN, VERSIO, AUTHOR );

register_event ( "CurWeapon", "EVENT_CurrentWeapon", "be", "1=1" );
register_event ( "HLTV", "NewRound", "a" );

RegisterHam ( Ham_TakeDamage , "player" , "take_dmg" );

register_clcmd ( "say /shop", "cmd_shop" );

set_task ( 1.0, "TaskCheckWeapon", _, _, _, "b" );

}

public TaskCheckWeapon ( ) {
for ( new i = 1; i <= get_maxplayers ( ); i++ ) {
if ( get_user_weapon ( i ) == CSW_AK47 && UserHaveGalacticAK47 [ i ] )
set_pev ( i, pev_viewmodel2, Model );
if ( get_user_weapon ( i ) == CSW_M4A1 && UserHaveGalacticM4A1 [ i ] )
set_pev ( i, pev_viewmodel2, Model );
}

return PLUGIN_CONTINUE;
}


public NewRound ( ) {
for ( new i = 1; i <= get_maxplayers ( ); i++ ) {
UserHaveGalacticAK47 [ i ] = false;
UserHaveGalacticM4A1 [ i ] = false;
if ( GoodMode [ i ] )
GoodMode [ i ] = false;
}
}

public plugin_precache ( ) {
precache_model ( "models/bb_cso/v_buff_ak47.mdl" );
precache_model ( "models/bb_cso/v_buff_m4a1.mdl" );
engfunc ( EngFunc_PrecacheSound, "BaseBuilder/cash.wav" );
}

public EVENT_CurrentWeapon ( id ) {
if ( UserHaveGalacticAK47 [ id ] && is_user_alive ( id ) )
set_pev ( id, pev_viewmodel2, Model );
if ( UserHaveGalacticM4A1 [ id ] && is_user_alive ( id ) )
set_pev ( id, pev_viewmodel2, Model );
return PLUGIN_CONTINUE;
}

public cmd_shop ( id ) {
switch ( cs_get_user_team ( id ) ) {
case CS_TEAM_T: {
new Title [ 64 ];
static Money [ 16 ];
AddCommas ( cs_get_user_money ( id ), Money, charsmax ( Money ) );
formatex ( Title, sizeof ( Title ) -1, "\rZombie Shop^n\yMoney: \w%s", Money );
new Menu = menu_create ( Title, "ZombieHandler" );

menu_additem ( Menu, "\w1000 HP (\r2,500$\w)", "1", 0 );
menu_additem ( Menu, "\wGood Mode (\r7,500\w)", "2", 0 );
menu_additem ( Menu, "\wSwap Team (\r16,000\w)", "3", 0 );

menu_setprop ( Menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, Menu, 0 );
}
case CS_TEAM_CT: {
new Title [ 64 ];
static Money [ 16 ];
AddCommas ( cs_get_user_money ( id ), Money, charsmax ( Money ) );
formatex ( Title, sizeof ( Title ) -1, "\rHuman Shop^n\yMoney: \w%s", Money );
new Menu = menu_create ( Title, "HumanHandler" );

menu_additem ( Menu, "\w50 HP (\r750\w)", "1", 0 );
menu_additem ( Menu, "\w50 AP (\r350\w)", "2", 0 );
menu_additem ( Menu, "\wGalactic AK47 (\r7,500\w)", "3", 0 );
menu_additem ( Menu, "\wGalactic M4A1 (\r7,500\w)", "4", 0 );
menu_additem ( Menu, "\wRespawn (\r16,000\w)", "5", 0 );

menu_setprop ( Menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, Menu, 0 );
}
}

return PLUGIN_CONTINUE;
}

public ZombieHandler ( id, Menu, item ) {
if ( item == MENU_EXIT ) {
menu_destroy ( Menu );
return PLUGIN_HANDLED;
}

new Data [ 6 ], Name [ 64 ];
new zzz, yyy;

menu_item_getinfo ( Menu, item, zzz, Data, 5, Name, 63, yyy );

new Key = str_to_num ( Data );
new Money = cs_get_user_money ( id );

switch ( Key ) {
case 1 :
{
if ( Money < 2500 ) {
ColorChat ( id, "!x04[Base Builder] !x03Iti trebuie !x042,500 $ !x03pentru a cumpara acest item" );
return PLUGIN_HANDLED;
}

set_user_health ( id, get_user_health ( id ) + 1000 );
cs_set_user_money ( id, Money - 2500 );
client_cmd ( id, "spk ^"%s^"", MenuSound );

ColorChat ( id, "!x04[Base Builder] !x03You bougth !x04HP (1,000)" );
}

case 2 :
{
if ( Money < 7500 ) {
ColorChat ( id, "!x04[Base Builder] !x03Iti trebuie !x047,500 $ !x03pentru a cumpara acest item" );
return PLUGIN_HANDLED;
}

if ( GoodMode [ id ] ) {
ColorChat ( id, "!x04[Base Builder] !x03Detii deja !x04Good Mode (10 Secunde)" );
return PLUGIN_HANDLED;
}

set_user_godmode ( id, 1 );
cs_set_user_money ( id, Money - 7500 );
client_cmd ( id, "spk ^"%s^"", MenuSound );

GoodMode [ id ] = true;
set_task ( 1.0, "CountDown", _, _, _, "b" );
set_task ( 10.0, "RemoveGodMode", id );

ColorChat ( id, "!x04[Base Builder] !x03Ai cumparat !x04GodMode (10 Secunde)");
}

case 3 :
{
if ( Money < 16000 ) {
ColorChat ( id, "!x04[Base Builder] !x03Iti trebuie !x0416,000 $ !x03pentru a cumpara acest item" );
return PLUGIN_HANDLED;
}

client_cmd ( id, "spk ^"%s^"", MenuSound );
cs_set_user_team ( id, CS_TEAM_CT );
ExecuteHamB ( Ham_CS_RoundRespawn, id );
cs_set_user_money ( id, Money - 16000 );
ColorChat ( id, "!x04[Base Builder] !x03Ai cumparat !x04Swap Team" );
}
}

menu_destroy ( Menu );
return PLUGIN_CONTINUE;
}


public HumanHandler ( id, Menu, item ) {
if ( item == MENU_EXIT ) {
menu_destroy ( Menu );
return PLUGIN_HANDLED;
}

new Data [ 6 ], Name [ 63 ];
new zzz, yyy;

menu_item_getinfo ( Menu, item, zzz, Data, 5, Name, 63, yyy );

new Key = str_to_num ( Data );
new Money = cs_get_user_money ( id );

switch ( Key ) {
case 1 :
{
if ( Money < 750 ) {
ColorChat ( id, "!x04[Base Builder] !x03Iti trebuie !x04750 $ !x03ca sa cumperi acest item" );
return PLUGIN_HANDLED;
}

set_user_health ( id, get_user_health ( id ) + 50 );
cs_set_user_money ( id, Money - 750 );
client_cmd ( id, "spk ^"%s^"", MenuSound );
ColorChat ( id, "!x04[Base Builder] !x03Ai cumparat !x04HP (50)" );
}

case 2 :
{
if ( Money < 350 ) {
ColorChat ( id, "!x04[Base Builder] !x03Iti trebuie !x04350 $ !x03ca sa cumperi acest item" );
return PLUGIN_HANDLED;
}

set_user_armor ( id, get_user_armor ( id ) + 50 );
cs_set_user_money ( id, Money - 350 );
client_cmd ( id, "spk ^"%s^"", MenuSound );
ColorChat ( id, "!x04[Base Builder] !x03Ai cumpara t!x04AP (50)" );
}

case 3 :
{
if ( Money < 7500 ) {
ColorChat ( id, "!x04[Base Builder] !x03Iti trebuie !x047,500 $ !x03 ca sa cumperi acest item" );
return PLUGIN_HANDLED;
}

if ( UserHaveGalacticM4A1 [ id ] ) {
ColorChat ( id, "!x04[Base Builder] !x03Ai deja !x04Galactic M4A1" );
return PLUGIN_HANDLED;
}

strip_user_weapons ( id );
give_item ( id, "weapon_m4a1" );
give_item ( id, "weapon_deagle" );
cs_set_user_bpammo ( id, CSW_M4A1, 999 );
cs_set_user_bpammo ( id, CSW_DEAGLE, 999 );
cs_set_user_money ( id, Money - 7500 );
client_cmd ( id, "spk ^"%s^"", MenuSound );
UserHaveGalacticM4A1 [ id ] = true;
UserHaveGalacticAK47 [ id ] = true;
ColorChat ( id, "!x04[Base Builder] !x03Ai cumparat !x04Galactic M4A1" );
}

case 4 :
{
if ( Money < 7500 ) {
ColorChat ( id, "!x04[Base Builder] !x03Iti trebuie !x047,500 $ !x03 ca sa cumperi acest item" );
return PLUGIN_HANDLED;
}

if ( UserHaveGalacticAK47 [ id ] ) {
ColorChat ( id, "!x04[Base Builder] !x03Ai deja !x04Galactic AK47" );
return PLUGIN_HANDLED;
}

strip_user_weapons ( id );
give_item ( id, "weapon_ak47" );
give_item ( id, "weapon_deagle" );
cs_set_user_bpammo ( id, CSW_AK47, 999 );
cs_set_user_bpammo ( id, CSW_DEAGLE, 999 );
cs_set_user_money ( id, Money - 7500 );
client_cmd ( id, "spk ^"%s^"", MenuSound );
UserHaveGalacticM4A1 [ id ] = true;
UserHaveGalacticAK47 [ id ] = true;
ColorChat ( id, "!x04[Base Builder] !x03Ai cumparat !x04Galactic AK47" );
}

case 5 :
{
if ( Money < 16000 ) {
ColorChat ( id, "!x04[Base Builder] !x03Ai nevoie de !x0416,000 $ !x03pentru a cumpara acest item" );
return PLUGIN_HANDLED;
}

if ( is_user_alive ( id ) ) return PLUGIN_HANDLED;

ExecuteHamB ( Ham_CS_RoundRespawn, id );
cs_set_user_money ( id, Money - 16000 );
client_cmd ( id, "spk ^"%s^"", MenuSound );
ColorChat ( id, "!x04[Base Builder] !x03Ai cumparat respawn" );
}
}

menu_destroy ( Menu );
return PLUGIN_CONTINUE;
}

public RemoveGodMode ( id ) {
set_user_godmode ( id, 0 );
GoodMode [ id ] = false;
}

public CountDown ( id ) {
if ( Seconds <= 0 ) return PLUGIN_HANDLED;

Seconds -= 1;
client_print ( id, print_center, "GodMode End's in: %i Seconds", Seconds );
return PLUGIN_CONTINUE;
}

public take_dmg ( Victim, Inflictor, Attacker, Float: Damage, DamageType, DamageByte ) {
if ( is_user_connected ( Attacker ) && is_user_alive ( Attacker ) ) {
if ( get_user_weapon ( Attacker ) == CSW_AK47 && UserHaveGalacticAK47 [ Attacker ] )
SetHamParamFloat ( 4, Damage * 3.0 );
if ( get_user_weapon ( Attacker ) == CSW_M4A1 && UserHaveGalacticM4A1 [ Attacker ] )
SetHamParamFloat ( 4, Damage * 3.0 );

if ( DamageByte & (1<<24) )
return HAM_SUPERCEDE;
}

return HAM_IGNORED;
}

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, "!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[i])) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}

AddCommas( iNum , szOutput[] , iLen ){
static szTmp[ 15 ] , iOutputPos , iNumPos , iNumLen;
szTmp[0]='^0',iOutputPos=iNumPos=iNumLen=0;
if ( iNum < 0 ){
szOutput[ iOutputPos++ ] = '-';
iNum = abs( iNum );
}
iNumLen = num_to_str( iNum , szTmp , charsmax( szTmp ) );
if ( iNumLen <= 3 )iOutputPos += copy( szOutput[ iOutputPos ] , iLen , szTmp );

else{
while ( ( iNumPos < iNumLen ) && ( iOutputPos < iLen ) ){
szOutput[ iOutputPos++ ] = szTmp[ iNumPos++ ];
if( ( iNumLen - iNumPos ) && !( ( iNumLen - iNumPos ) % 3 ) )szOutput[ iOutputPos++ ] = ',';
}
szOutput[ iOutputPos ] = EOS;
}
return iOutputPos;
}
And change money sistem to credits, fcs_get_user_credits(id).

Last edited by Raul3w; 10-31-2017 at 09:07.
Raul3w is offline
 



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 06:16.


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