Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

Dodanie Deagle do Sklepu

modyfikacja

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
3 odpowiedzi w tym temacie

#1 Rubikrapid

    Nowy

  • Użytkownik

Reputacja: -1
Nowy

  • Postów:8
  • Lokalizacja:Bełchatów
Offline

Napisano 30.07.2014 17:02

Prosiłbym aby do sklepu który podam dodać Deagle z 1 nabojem za 12000$

#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 /cybersklep", "jbshop")
register_clcmd("say /cybershop", "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 }
*/

  • +
  • -
  • 0

#2 SmileY.

    Początkujący

  • Użytkownik

Reputacja: 1
Nowy

  • Postów:14
  • Imię:Krystian
  • Lokalizacja:Polska
Offline

Napisano 30.07.2014 18:06

Możesz sprawdzić.. Nie wiem czy będzie 1 czy 7 ammo. :)

#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 /cybersklep", "jbshop")
register_clcmd("say /cybershop", "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_additem(menu,"\yDeagle z 1 ammo \d[12000$]","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) 
} 
case 7 :{ 
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 deagle z 1 ammo", name) 
give_item(id, "weapon_deagle")
} 


}


} 
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 }
*/

  • +
  • -
  • 0

#3 Rubikrapid

    Nowy

  • Autor tematu
  • Użytkownik

Reputacja: -1
Nowy

  • Postów:8
  • Lokalizacja:Bełchatów
Offline

Napisano 30.07.2014 21:41

Nie mogę skompilować
 

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
 
csklep.smax(24) : warning 217: loose indentation
csklep.smax(221) : error 014: invalid statement; not in switch
csklep.smax(221) : warning 215: expression has no effect
csklep.smax(221) : error 001: expected token: ";", but found ":"
csklep.smax(221) : error 029: invalid expression, assumed zero
csklep.smax(221) : fatal error 107: too many error messages on one line
 
Compilation aborted.
4 Errors.

  • +
  • -
  • 0

#4 Oporowiec

    Wszechobecny

  • Zbanowany

Reputacja: 119
Zaawansowany

  • Postów:441
  • GG:
  • Imię:Maciej
  • Lokalizacja:Małopolska
Offline

Napisano 07.08.2014 13:13

poprawiłem to co dał 45859

Załączone pliki


Aktualny projekt: Dokumentacja Offline || [ 10% ]






Również z jednym lub większą ilością słów kluczowych: modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych