Raised This Month: $51 Target: $400
 12% 

All Scripters I need HELP pls - zp_SHOP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-06-2014 , 09:46   All Scripters I need HELP pls - zp_SHOP
Reply With Quote #1

someone , know's how to do this please ! (If Anyone dont know how to do , and if someone has this .sma or .amxx pls send it to me :'( )
(Explain) This plugin , when i Buy Item God Mode , it Shows "You Bought God Mode", But its Giving After that Round i bought that item ,, Are 2 Items that i buy , and they give me that ability after 1 round , its -> "God Mode" & "Dual Damage" ,, i know how to make this to be Bought with Ammo , but anyone know's how to do this? When i Buy God mode to give Directly God Mode pleasee ? Thank you

Here its the Code

PHP Code:
#define _xs_included
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta_util>
#include <zombie_plague_advance>

new const xPrefix[] =    "!g[ZM Buy]";
new 
cvar_godmode_costcvar_damage_costcvar_slot_costcvar_ammo_cost;
new 
bool:g_GodMode[33], bool:g_Damage[33], bool:g_Damage2[33], bool:g_Password[33];

public 
plugin_init() {
    
register_plugin("ZM Buy""1.0""xxx");
    
register_clcmd("amx_slot_password""hattrick"ADMIN_USER"<password>");
    
register_clcmd("say /menu""command_Buy");
    
register_clcmd("say menu""command_Buy");
    
register_clcmd("say /shop""command_Buy");
    
register_clcmd("say shop""command_Buy");
    
register_menucmd(register_menuid("aaaxMenu1"), 1023"BuyMenu");
    
RegisterHam(Ham_Spawn"player""ham_PlayerSpawned_Post"1);
    
RegisterHam(Ham_Killed"player""ham_PlayerKilled");
    
RegisterHam(Ham_TakeDamage"player""ham_TakeDamage");
    
cvar_godmode_cost register_cvar("zm_godmode_cost""100");
    
cvar_damage_cost register_cvar("zm_damage_cost""60");
    
cvar_slot_cost register_cvar("zm_slot_cost""450");
    
cvar_ammo_cost register_cvar("zm_ammo_cost""180");
}

public 
command_Buy(id) {
    new 
menuBody[2025];
    
add(menuBody2024"\yZM Buy Menu^n^n");
    
add(menuBody2024"\r1.\w God Mode \y[100 Points]^n");
    
add(menuBody2024"\r2.\w Dual Damage \y[60 Points]^n");
    
add(menuBody2024"\r3.\w Buy \rReserved Slot \wOn Server^n");
    
add(menuBody2024"\r4.\w 60 Ammo Packs \y[Now]^n^n");
    
add(menuBody2024"\r0.\w Exit^n");
    
show_menu(id, (1<<1<<1<<1<<1<<1<<1<<1<<1<<1<<9), menuBody, -1"aaaxMenu1");
}

public 
ham_TakeDamage(victiminflictorattackerFloat:damage) {
    if (
victim == attacker || !is_user_connected(attacker)) return HAM_IGNORED;
    if (
g_Damage2[attacker]) {
        
damage *= 2.0;
        
SetHamParamFloat(4damage);
    }
    return 
HAM_IGNORED;
}

public 
ham_PlayerKilled(id) if (is_user_connected(id) && g_Damage2[id]) g_Damage2[id] = false;
public 
client_putinserver(idset_task(25.0"task_Announce"id);
public 
task_Announce(id) {
    if (
is_user_connected(id)) {
        
write_colored(id"%s !nScrie !t/shop !npentru a deschide meniul !tShop"xPrefix);
        
write_colored(id"%s !nScrie !t/shop !npentru a deschide meniul !tShop"xPrefix);
    }
}

public 
BuyMenu(idkey) {
    new 
name[32];
    
get_user_name(idname31);
    switch(
key) {
        case 
0: {
            if (
zm_get_user_points(id) >= get_pcvar_num(cvar_godmode_cost)) {
                
g_GodMode[id] = true;
                
write_colored(0"%s !t%s !na cumparat !tGod Mode"xPrefixname);
                
zm_del_user_points(idget_pcvar_num(cvar_godmode_cost));
            } else 
write_colored(id"%s !nNu ai destule puncte! Necesare sunt !t%d !npuncte"xPrefixget_pcvar_num(cvar_godmode_cost));
        } case 
1: {
            if (
zm_get_user_points(id) >= get_pcvar_num(cvar_damage_cost)) {
                
g_Damage[id] = true;
                
write_colored(0"%s !t%s !na cumparat !tDual Damage"xPrefixname);
                
zm_del_user_points(idget_pcvar_num(cvar_damage_cost));
            } else 
write_colored(id"%s !nNu ai destule puncte! Necesare sunt !t%d !npuncte"xPrefixget_pcvar_num(cvar_damage_cost));
        } case 
2: {
            if (
zm_get_user_points(id) >= get_pcvar_num(cvar_slot_cost)) {
                if (
is_user_admin(id)) {
                    
write_colored(id"%s !n=== YOU CAN'T BUY!!! ==="xPrefix);
                    return 
PLUGIN_HANDLED;
                }
                
g_Password[id] = true;
                
fm_strip_user_weapons(id);
                
fm_set_user_noclip(id1);
                
fm_set_user_godmode(id1);
                
fm_set_user_maxspeed(id0.0001);
                
client_cmd(id"messagemode amx_slot_password");
                
write_colored(0"%s !t%s !na cumparat !tSlot Rezervat"xPrefixname);
                
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
                
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
                
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
                
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
                
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
                
zm_del_user_points(idget_pcvar_num(cvar_slot_cost));
            } else 
write_colored(id"%s !nNu ai destule puncte! Necesare sunt !t%d !npuncte"xPrefixget_pcvar_num(cvar_slot_cost));
        } case 
3: {
            if (
zm_get_user_points(id) >= get_pcvar_num(cvar_ammo_cost)) {
                
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + 60);
                
write_colored(0"%s !t%s !na cumparat !t60 Ammo Packs"xPrefixname);
                
zm_del_user_points(idget_pcvar_num(cvar_ammo_cost));
            } else 
write_colored(id"%s !nNu ai destule puncte! Necesare sunt !t%d !npuncte"xPrefixget_pcvar_num(cvar_ammo_cost));
        }
        default: return 
PLUGIN_CONTINUE;
    }
    return 
PLUGIN_CONTINUE;
}

public 
hattrick(id) {
    if (!
g_Password[id]) {
        
write_colored(id"%s !n=== YOU CAN'T BUY!!! ==="xPrefix);
        return 
PLUGIN_HANDLED;
    }
    new 
name[32];
    
get_user_name(idname31);
    new 
password[35];
    
read_args(password34);
    
remove_quotes(password);
    if (
equal(password"")) {
        
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
        
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
        
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
        
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
        
write_colored(id"%s !nSCRIE PAROLA DORITA. WRITE A PASSWORD."xPrefix);
        
client_cmd(id"messagemode amx_slot_password");
        return 
PLUGIN_HANDLED;
    }
    
g_Password[id] = false;
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_print(idprint_console"[ZM Buy] Your password: %s"password);
    
client_cmd(id"topcolor ^"^";rate ^"^";model ^"^";setinfo ^"_reddevil^" ^"%s^""password);
    
server_cmd("amx_addadmin ^"%s^" ^"bi^" ^"%s^" ^"name^""namepassword);
    
server_cmd("amx_reloadadmins");
    
log_to_file("zm_buy_slot.log""%s a cumparat slot. Parola este %s"namepassword);
    
server_exec();
    return 
PLUGIN_HANDLED;
}

public 
ham_PlayerSpawned_Post(id) {
    if (
g_Damage2[id]) g_Damage2[id] = false;
    if (
g_GodMode[id]) {
        
g_GodMode[id] = false;
        
fm_set_user_godmode(id1);
    }
    if (
g_Damage[id]) {
        
g_Damage[id] = false;
        
g_Damage2[id] = true;
    }
}

public 
client_disconnect(id) {
    if (
g_GodMode[id]) g_GodMode[id] = false;
    if (
g_Damage[id]) g_Damage[id] = false;
    if (
g_Damage2[id]) g_Damage2[id] = false;
    if (
g_Password[id]) g_Password[id] = false;
}

public 
write_colored(const id, const string[], {FloatSqlResul,_}:...) {
    new 
msg[191], players[32], count 1;
    
vformat(msg190string3);
    
replace_all(msg190"!n""^1");
    
replace_all(msg190"!t""^3");
    
replace_all(msg190"!g""^4");
    if (
idplayers[0] = id;
    else 
get_players(playerscount"ch");
    for (new 
0counti++) {
        if (
is_user_connected(players[i])) {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }

(i've tried to much times to do this but nothing ... ) Again i will thank from my heart who , tries to make this
__________________

Last edited by ghost95v; 09-08-2014 at 07:54.
ghost95v is offline
Send a message via Skype™ to ghost95v
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-07-2014 , 06:19   Re: [REQ] I need HELP pls - zp_SHOP
Reply With Quote #2

bump , pls
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-08-2014 , 04:39   Re: [REQ] I need HELP pls - zp_SHOP
Reply With Quote #3

Quote:
Originally Posted by ghost95v View Post
bump , pls
i need some help AlliedModers ? :'(
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
Reply



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 22:57.


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