очки anew через gamecms present

Статус
В этой теме нельзя размещать новые ответы.

DOBRIU

Новичок
Сообщения
130
Решения
1
Реакции
-1
Здравствуйте! так и не разобрался как выдавать очки anew через gamecms present, ковырял inc но как я понял так не получается, даже не компилит ругается на эту строчку которую я добавляю! Помогите ребят исправить, делаю так:
добавляю в case

ar_forward_addanew(id, num)
ColorChat(id, print_chat, "^4[server] ^1Вы получили ^4+3 очка")

и это сколько выдать при поднятии
#define present_anew 3 выдавать очков anew
 
@SKAJIbnEJIb,
Код:
#include <amxmodx>
#include < fakemeta >
#include <gamecms_present>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <reapi>

native ar_add_user_anew(iAdmin, iPlayer, anew);

#define present_anew 3

//Если основной плагин презентов не стартанул, останавливаем
public OnPresentCoreStopped()
    pause("d");
 
public plugin_cfg()
{
    CmsAddPresent(300, "Автомат АК-47", -1, 0, 0, "models");
    CmsAddPresent(301, "Автомат M4A1", -1, 0, 0, "models");
    CmsAddPresent(302, "anew", -1, 0, 0, "models");
    //и т.д...
}

//событие попытки поднять презент
public OnTakePresent(id, itemId, iEntity)
{
    switch(itemId)
    {
        case 300:
        {
            if(rg_give_item(id, "weapon_ak47", GT_DROP_AND_REPLACE))
            {
                rg_set_user_bpammo(id, CSW_AK47, 90);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили оружие AK47")
                return 2;
            }
        }
        case 301:
        {
            if(rg_give_item(id, "weapon_m4a1", GT_DROP_AND_REPLACE))
            {
                rg_set_user_bpammo(id, CSW_M4A1, 90);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили оружие M16")
                return 2;
        }
        case 302:
        {
                ar_add_user_anew(iAdmin, iPlayer, anew);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили ^4+3 очка anew")
                return 2;
        }

    }

    return PLUGIN_CONTINUE;
}
ошибка в ar_add_user_anew(iAdmin, iPlayer, anew);
 
@SKAJIbnEJIb,
Код:
#include <amxmodx>
#include < fakemeta >
#include <gamecms_present>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <reapi>

native ar_add_user_anew(iAdmin, iPlayer, anew);

#define present_anew 10

//Если основной плагин презентов не стартанул, останавливаем
public OnPresentCoreStopped()
    pause("d");
    
public plugin_cfg()
{
    CmsAddPresent(300, "Автомат АК-47", -1, 0, 0, "sunduk");
    CmsAddPresent(301, "Автомат M4A1", -1, 0, 0, "sunduk");
    CmsAddPresent(302, "anew", -1, 0, 0, "sunduk");
    //и т.д...
}

//событие попытки поднять презент
public OnTakePresent(id, itemId, iEntity)
{
    switch(itemId)
    {
        case 300:
        {
            if(rg_give_item(id, "weapon_ak47", GT_DROP_AND_REPLACE))
            {
                rg_set_user_bpammo(id, CSW_AK47, 90);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили оружие AK47")
                return 2;
            }
        }
        case 301:
        {
            if(rg_give_item(id, "weapon_m4a1", GT_DROP_AND_REPLACE))
            {
                rg_set_user_bpammo(id, CSW_M4A1, 90);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили оружие M16")
                return 2;
        }
        case 302:
        {
                ar_add_user_anew(-1, id, 3);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили ^43 очка anew")
                return 2;
        }

    }
  
    return PLUGIN_CONTINUE;
}
ошибки 95 строка
Код:
example.sma(95) : error 014: invalid statement; not in switch
example.sma(95) : warning 215: expression has no effect
example.sma(95) : error 001: expected token: ";", but found ":"
example.sma(95) : error 029: invalid expression, assumed zero
example.sma(95) : fatal error 107: too many error messages on one line
 
@SKAJIbnEJIb, сделал так
Код:
#include <amxmodx>
#include < fakemeta >
#include <gamecms_present>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <reapi>

//Если основной плагин презентов не стартанул, останавливаем
public OnPresentCoreStopped()
    pause("d");
   
public plugin_cfg()
{
    CmsAddPresent(300, "Автомат АК-47", -1, 0, 0, "sunduk");
    CmsAddPresent(301, "Автомат M4A1", -1, 0, 0, "sunduk");
    CmsAddPresent(302, "anew", -1, 0, 0, "sunduk");
    //и т.д...
}

//событие попытки поднять презент
public OnTakePresent(id, itemId, iEntity)
{
    switch(itemId)
    {
        case 300:
        {
            if(rg_give_item(id, "weapon_ak47", GT_DROP_AND_REPLACE))
            {
                rg_set_user_bpammo(id, CSW_AK47, 90);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили оружие AK47")
                return 2;
               }
        }
        case 301:
        {
            if(rg_give_item(id, "weapon_m4a1", GT_DROP_AND_REPLACE))
            {
                rg_set_user_bpammo(id, CSW_M4A1, 90);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили оружие M16")
                return 2;
               }
        }
        case 302:
        {
                ar_add_user_anew(-1, id, 3);
                ColorChat(id, print_chat, "^4[server] ^1Вы получили ^43 очка anew")
                return 2;
        }
    }
    return PLUGIN_CONTINUE;
}

ошибки

exampl.sma(30) : warning 213: tag mismatch
exampl.sma(39) : warning 213: tag mismatch
exampl.sma(46) : error 017: undefined symbol "ar_add_user_anew"
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху
Назад