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

Problem z kompilacją pluginuJest aż 7 błędów , nie wiem jak naprawić


  • Zamknięty Temat jest zamknięty
5 odpowiedzi w tym temacie

#1 Racz'Q

    Pomocny

  • Użytkownik

Reputacja: 3
Nowy

  • Postów:49
  • Imię:kuba
  • Lokalizacja:polska , gdyni
Offline

Napisano 25.03.2011 14:39

Witam napisałem swój plugin . Po wpisaniu /brontt /bronct /bronsnajper daje ekwipunek .

#include <amxmodx>            

#define PLUGIN "Bron"     
#define VERSION "1.0"            
#define AUTHOR "Plantacja"            


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("bronsnajper", "bronsnajper") 
    register_clcmd("bronct", "bronct")
    register_clcmd("brontt", "brontt")


public bronsnajper(id)
{
    if(cs_get_user_money(id)>6000)
    give_item ( id, "weapon_awp" )
    give_item ( id, "weapon_ammo_338magnum")
    give_item ( id, "weapon_ammo_338magnum")
    give_item ( id, "weapon_ammo_338magnum")
    give_item ( id, "weapon_weapon_deagle")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_hegrenade")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_smokegrenade")
    cs_get_user_armor(id, cs_armor_vesthelm = 2)
    cs_set_user_money(id,cs_get_user_money(id) - 6000)
    client_print ( id, print_chat, " Dostales Zestaw Snajpera - Straciles 6000 $")
    client_print else ( id, print_chat, " Masz za malo kasy ")
}
public bronct(id)
{
    if(cs_get_user_money(id)>4500)
    give_item ( id, "weapon_m4a1")
    give_item ( id, "weapon_ammo_556nato")
    give_item ( id, "weapon_ammo_556nato")
    give_item ( id, "weapon_ammo_556nato")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_hegrenade")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_smokegrenade")
    cs_get_user_armor(id, cs_armor_vesthelm = 2)
    cs_set_user_money(id,cs_get_user_money(id) - 4500)
    client_print (id, print_chat, " Dostales Zestaw Anty Terrorysty - Straciles 4500 $")
    client_print else ( id, print_chat, " Masz za malo kasy ")
  
  
    
}

public brontt(id)
{ 
    if(cs_get_user_money(id)>4500)
    give_item ( id, "weapon_ak47")
    give_item ( id, "weapon_ammo_762nato")
    give_item ( id, "weapon_ammo_762nato")
    give_item ( id, "weapon_ammo_762nato")
    give_item ( id, "weapon_ammo_9mm")
    give_item ( id, "weapon_ammo_9mm")
    give_item ( id, "weapon_ammo_9mm")
    give_item ( id, "weapon_ammo_9mm") give_item ( id, "weapon_hegrenade")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_smokegrenade")
    cs_get_user_armor(id, cs_armor_vesthelm = 2)
    cs_set_user_money(id,cs_get_user_money(id) - 4500)
    client_print (id, print_chat, " Dostales Zestaw Terrorysty - Straciles 4500 $")
    client_print else ( id, print_chat, " Masz za malo kasy ")
}
  

Errors :

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

bron.sma(15) : warning 217: loose indentation
bron.sma(15) : error 029: invalid expression, assumed zero
bron.sma(15) : error 017: undefined symbol "bronsnajper"
bron.sma(17) : error 017: undefined symbol "cs_get_user_money"
bron.sma(18) : error 017: undefined symbol "give_item"
bron.sma(18) : warning 215: expression has no effect
bron.sma(18) : error 001: expected token: ";", but found ")"
bron.sma(18) : error 029: invalid expression, assumed zero
bron.sma(18) : fatal error 107: too many error messages on one line

Compilation aborted.
7 Errors.


Proszę o pomoc . Głowiłem się ja i kolega ,ale sami sobie nie damy rady.
Acha . I chciałbym żeby ktoś mi powiedział jak zrobić ,by np /brontt ta komenda byla tylko dla tt /bronct tylko dla ct /bronsnajper dla tt i ct . Dziekuje :)


Proszę o pomoc . Dziękuje z góry.
  • +
  • -
  • 0

#2 FreZZy

    Guru

  • Zbanowany

Reputacja: 210
Profesjonalista

  • Postów:716
  • GG:
  • Imię:Paweł
  • Lokalizacja:Wwa
Offline

Napisano 25.03.2011 15:08

pod

#include <amxmodx>


daj

#include <fun>


Dodano 25 marzec 2011 - 15:10:
PS: zapomniałeś dać ifa, czy gracz jest żywy (is_user_alive)

Użytkownik FreZZy edytował ten post 25.03.2011 15:08


#3 Racz'Q

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 3
Nowy

  • Postów:49
  • Imię:kuba
  • Lokalizacja:polska , gdyni
Offline

Napisano 25.03.2011 15:34

pod

#include <amxmodx>


daj

#include <fun>


Dodano 25 marzec 2011 - 15:10:
PS: zapomniałeś dać ifa, czy gracz jest żywy (is_user_alive)



dodałem include fun ,ale nadal mam 7 błędów .

bron.sma(16) : warning 217: loose indentation
bron.sma(16) : error 029: invalid expression, assumed zero
bron.sma(16) : error 017: undefined symbol "bronsnajper"
bron.sma(19) : error 017: undefined symbol "cs_get_user_money"
bron.sma(20) : error 017: undefined symbol "id"
bron.sma(20) : warning 215: expression has no effect
bron.sma(20) : error 001: expected token: ";", but found ")"
bron.sma(20) : error 029: invalid expression, assumed zero
bron.sma(20) : fatal error 107: too many error messages on one line

#include <amxmodx>
#include <fun>            

#define PLUGIN "Bron"     
#define VERSION "1.0"            
#define AUTHOR "Plantacja"            


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("bronsnajper", "bronsnajper") 
    register_clcmd("bronct", "bronct")
    register_clcmd("brontt", "brontt")


public bronsnajper(id)
{
  
    if(cs_get_user_money(id)>6000)
    give_item ( id, "weapon_awp" )
    give_item ( id, "weapon_ammo_338magnum")
    give_item ( id, "weapon_ammo_338magnum")
    give_item ( id, "weapon_ammo_338magnum")
    give_item ( id, "weapon_weapon_deagle")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_ammo_50ae")
    give_item ( id, "weapon_hegrenade")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_smokegrenade")
    cs_get_user_armor(id, cs_armor_vesthelm = 2)
    cs_set_user_money(id,cs_get_user_money(id) - 6000)
    client_print ( id, print_chat, " Dostales Zestaw Snajpera - Straciles 6000 $")
    client_print else ( id, print_chat, " Masz za malo kasy ")
}
public bronct(id)
{
  
    if(cs_get_user_money(id)>4500)
    give_item ( id, "weapon_m4a1")
    give_item ( id, "weapon_ammo_556nato")
    give_item ( id, "weapon_ammo_556nato")
    give_item ( id, "weapon_ammo_556nato")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_ammo_45acp")
    give_item ( id, "weapon_hegrenade")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_smokegrenade")
    cs_get_user_armor(id, cs_armor_vesthelm = 2)
    cs_set_user_money(id,cs_get_user_money(id) - 4500)
    client_print (id, print_chat, " Dostales Zestaw Anty Terrorysty - Straciles 4500 $")
    client_print else ( id, print_chat, " Masz za malo kasy ")
  
  
    
}

public brontt(id)
{ 
  
    if(cs_get_user_money(id)>4500)
    give_item ( id, "weapon_ak47")
    give_item ( id, "weapon_ammo_762nato")
    give_item ( id, "weapon_ammo_762nato")
    give_item ( id, "weapon_ammo_762nato")
    give_item ( id, "weapon_ammo_9mm")
    give_item ( id, "weapon_ammo_9mm")
    give_item ( id, "weapon_ammo_9mm")
    give_item ( id, "weapon_ammo_9mm") give_item ( id, "weapon_hegrenade")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_flashbang")
    give_item ( id, "weapon_smokegrenade")
    cs_get_user_armor(id, cs_armor_vesthelm = 2)
    cs_set_user_money(id,cs_get_user_money(id) - 4500)
    client_print (id, print_chat, " Dostales Zestaw Terrorysty - Straciles 4500 $")
    client_print else ( id, print_chat, " Masz za malo kasy ")
}




powie ktoś ? :/
  • +
  • -
  • 0

#4 Muzzi

    Guru

  • Przyjaciel

Reputacja: 228
Wszechwidzący

  • Postów:772
  • Lokalizacja:Kraków
Offline

Napisano 25.03.2011 16:04

Sprawdź czy działa, na szybkiego robione.


#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "Bron"
#define VERSION "1.0"
#define AUTHOR "Plantacja"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("bronsnajper", "cmd_bronsnajper")
register_clcmd("bronct", "cmd_bronct")
register_clcmd("brontt", "cmd_brontt")
}


public cmd_bronsnajper(id)
{
if(is_user_alive(id))
{

if(cs_get_user_money(id) >= 6000)
{
give_item ( id, "weapon_awp" )
give_item ( id, "weapon_ammo_338magnum")
give_item ( id, "weapon_ammo_338magnum")
give_item ( id, "weapon_ammo_338magnum")
give_item ( id, "weapon_weapon_deagle")
give_item ( id, "weapon_ammo_50ae")
give_item ( id, "weapon_ammo_50ae")
give_item ( id, "weapon_ammo_50ae")
give_item ( id, "weapon_ammo_50ae")
give_item ( id, "weapon_ammo_50ae")
give_item ( id, "weapon_hegrenade")
give_item ( id, "weapon_flashbang")
give_item ( id, "weapon_flashbang")
give_item ( id, "weapon_smokegrenade")
cs_set_user_money(id,cs_get_user_money(id) - 6000)
client_print ( id, print_chat, " Dostales Zestaw Snajpera - Straciles 6000 $")
}
else
{
client_print( id, print_chat, " Masz za malo kasy ")
}
}
else
{
client_print( id, print_chat, " Niestety jestes DEAD ")
}
}

public bronct(id)
{
if(is_user_alive(id))
{

if(cs_get_user_money(id) >= 4500)
{
give_item ( id, "weapon_m4a1")
give_item ( id, "weapon_ammo_556nato")
give_item ( id, "weapon_ammo_556nato")
give_item ( id, "weapon_ammo_556nato")
give_item ( id, "weapon_ammo_45acp")
give_item ( id, "weapon_ammo_45acp")
give_item ( id, "weapon_ammo_45acp")
give_item ( id, "weapon_ammo_45acp")
give_item ( id, "weapon_ammo_45acp")
give_item ( id, "weapon_ammo_45acp")
give_item ( id, "weapon_ammo_45acp")
give_item ( id, "weapon_hegrenade")
give_item ( id, "weapon_flashbang")
give_item ( id, "weapon_flashbang")
give_item ( id, "weapon_smokegrenade")
cs_set_user_money(id,cs_get_user_money(id) - 4500)
client_print (id, print_chat, " Dostales Zestaw Anty Terrorysty - Straciles 4500 $")
}
else
{

client_print( id, print_chat, " Masz za malo kasy ")
}
}
else
{
client_print( id, print_chat, " Jestes DEAD ")
}
}


public brontt(id)
{
if(is_user_alive(id))
{

if(cs_get_user_money(id) >= 4500)
{
give_item ( id, "weapon_ak47")
give_item ( id, "weapon_ammo_762nato")
give_item ( id, "weapon_ammo_762nato")
give_item ( id, "weapon_ammo_762nato")
give_item ( id, "weapon_ammo_9mm")
give_item ( id, "weapon_ammo_9mm")
give_item ( id, "weapon_ammo_9mm")
give_item ( id, "weapon_ammo_9mm")
give_item ( id, "weapon_hegrenade")
give_item ( id, "weapon_flashbang")
give_item ( id, "weapon_flashbang")
give_item ( id, "weapon_smokegrenade")
cs_set_user_money(id,cs_get_user_money(id) - 4500)
client_print (id, print_chat, " Dostales Zestaw Terrorysty - Straciles 4500 $")
}
else
{

client_print( id, print_chat, " Masz za malo kasy ")
}
}
else
{
client_print( id, print_chat, " Jestes DEAD ")
}
}

  • +
  • -
  • 1

#5 Racz'Q

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 3
Nowy

  • Postów:49
  • Imię:kuba
  • Lokalizacja:polska , gdyni
Offline

Napisano 25.03.2011 16:28

I love You ! :D
  • +
  • -
  • 0

#6 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 489
  • Lokalizacja:AMXX.PL
Offline

Napisano 25.03.2011 18:41

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: I love You !

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL




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

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