#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <engine>
#define PLUGIN "Sklep"
#define VERSION "1.0"
#define AUTHOR "None"
new name [32];
new speed[33];
new ilosc_skokow_gracza[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /jbshop", "jbshop")
register_clcmd("say /shop", "jbshop")
register_clcmd("say /sklep", "jbshop")
register_event( "CurWeapon", "Event_Change_Weapon", "be", "1=1" );
RegisterHam(Ham_Spawn, "player", "Fwd_PlayerSpawn_Post", 1)
register_event("RoundTime","round_begin","bc");
register_forward(FM_CmdStart, "CmdStart");
}
/////////////////////////////////Skoki//////////////////
public CmdStart(id, uc_handle){
if(!is_user_alive(id))
return FMRES_IGNORED;
new flags = pev(id, pev_flags);
// obsluga multiskoku
if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && ilosc_skokow_gracza[id])
{
--ilosc_skokow_gracza[id];
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity,velocity);
}
else if(flags & FL_ONGROUND)
ilosc_skokow_gracza[id] = 2;
return FMRES_IGNORED;
}
public client_putinserver(id){
ilosc_skokow_gracza[id]=0;
speed[id]=0;
set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, 255);
}
public round_begin(){
new maxpl = get_maxplayers() +1;
for(new i=1; i < maxpl; ++i){
speed[i]=0;
ilosc_skokow_gracza[i]=0;
set_user_rendering(i, kRenderFxNone, 0,0,0, kRenderTransAlpha, 255)
}
}
//////////////////////////////////////////////////////////
public jbshop(id)
{
if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_T)
{
{
client_print(id, print_chat, "Tylko TT moze korzystac ze sklepu!")
}
new menu = menu_create("\wSklep Jail Break \r Edit by SlaNdisH","menu")
menu_additem(menu,"\ySzybkosc \d[16000$]","1",0)
menu_additem(menu,"\yGrawitacja \d[12000$]","2",0)
menu_additem(menu,"\yCiche Buty \d[10000$]","3",0)
menu_additem(menu,"\y2 Skoki \d[16000$]","4",0)
menu_additem(menu,"\y20HP \d[10000$]","5",0)
menu_additem(menu,"\y50HP \d[16000$]","6",0)
menu_setprop(menu,MPROP_EXIT,MEXIT_ALL)
menu_display(id,menu,0)
}
}
public menu(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 :{
if (cs_get_user_money(id) < 16000){
get_user_name(id, name, 31)
ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name)
return PLUGIN_HANDLED;
}
if (!is_user_alive(id)){
get_user_name(id, name, 31)
ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name)
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) >= 16000 ){
get_user_name(id, name, 31)
ColorChat(id, RED, "Kupiles wiekszego speeda.", name)
speed[id] = 1;
set_user_maxspeed(id, 500.0)
cs_set_user_money(id , cs_get_user_money(id) - 16000, 0)
}
}
case 2 : {
if (cs_get_user_money(id) < 12000){
get_user_name(id, name, 31)
ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name)
return PLUGIN_HANDLED;
}
if (!is_user_alive(id)){
get_user_name(id, name, 31)
ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name)
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) >= 12000 ){
get_user_name(id, name, 31)
ColorChat(id, RED, "Kupiles mniejsza gravitacje.", name)
set_user_gravity(id, 0.5)
cs_set_user_money(id , cs_get_user_money(id) - 12000, 0)
}
}
case 3 :{
if (cs_get_user_money(id) < 10000){
get_user_name(id, name, 31)
ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name)
return PLUGIN_HANDLED;
}
if (!is_user_alive(id)){
get_user_name(id, name, 31)
ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name)
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) >= 10000 ){
get_user_name(id, name, 31)
set_user_footsteps( id, 1)
ColorChat(id, RED, "Kupiles Ciche Buty.", name)
cs_set_user_money(id , cs_get_user_money(id) - 10000, 0)
}
}
case 4 :{
if (cs_get_user_money(id) < 16000){
get_user_name(id, name, 31)
ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name)
return PLUGIN_HANDLED;
}
if (!is_user_alive(id)){
get_user_name(id, name, 31)
ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name)
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) >= 16000 ){
get_user_name(id, name, 31)
ilosc_skokow_gracza[id] = 2;
ColorChat(id, RED, "Kupiles Double Jumpa, Dzięki ktoremu masz podwojny skok.", name)
cs_set_user_money(id , cs_get_user_money(id) - 16000, 0)
}
}
case 5 :{
if (cs_get_user_money(id) < 10000){
get_user_name(id, name, 31)
ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name)
return PLUGIN_HANDLED;
}
if (!is_user_alive(id)){
get_user_name(id, name, 31)
ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name)
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) >= 810000 ){
get_user_name(id, name, 31)
new health = get_user_health(id);
ColorChat(id, RED, "Kupiles 20HP", name)
set_user_health(id, health+20)
cs_set_user_money(id , cs_get_user_money(id) - 10000, 0)
}
}
case 6 :{
if (cs_get_user_money(id) < 16000){
get_user_name(id, name, 31)
ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name)
return PLUGIN_HANDLED;
}
if (!is_user_alive(id)){
get_user_name(id, name, 31)
ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name)
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) >= 16000 ){
get_user_name(id, name, 31)
new health = get_user_health(id);
ColorChat(id, RED, "Kupiles 50hp", name)
set_user_health(id, health+50)
cs_set_user_money(id , cs_get_user_money(id) - 16000, 0)
}
}
}
return PLUGIN_HANDLED;
}
public Event_Change_Weapon(id){
if(speed[id] == 1){
set_user_maxspeed(id, 500.0)
}
}
public Fwd_PlayerSpawn_Post(id){
if (is_user_alive(id)){
if(!speed[id]){
speed[id] = 0;
}
set_user_footsteps(id, 0)
}
}
/*
AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/