I want plugin that when someone write /buy to show menu with flags
for e.x.
1. Kick
2. Slap
3. Slay
and to cost 16 000$
and when someone buy something in chat to say> You have buyed Kick access
jjey1 писал(а): 50рублей думаю хватит! в интернете плагинов много золотых! но не где нету с количеством патронов!
Тут делать по сути нехрен) Взял любой плагин в интернете золотого оружия! того же Калаша!
Есть 3 модели сразу в одном из них! потом переписал на M4A1, потом переписал на Deagle! Комплит!
Готовые три плагина! с золотыми оружиями!!
#include <amxmodx>
#include <cstrike>
#define MAX_PLAYERS 32
new Trie:g_Access;
new const szMessageBuyAccess[] = "You have buyig Kick access";
new const g_szAccessFlags = "c";
const iNeedMoney = 16000;
new g_szAuthid[MAX_PLAYERS+1][28];
public plugin_init()
{
register_plugin("Buy access" , "1.0" , "Pafos");
register_clcmd("say /kick" , "CmdKick");
g_Access = TrieCreate();
}
public plugin_end()
{
TrieDestroy(g_Access);
}
public client_putinserver(nClientIndex)
{
get_user_authid(nClientIndex , g_szAuthid[nClientIndex] , charsmax(g_szAuthid[]));
if(TrieKeyExists(g_Access , g_szAuthid[nClientIndex])) set_user_flags(nClientIndex , read_flags(g_szAccessFlags));
}
public CmdKick(nClientIndex)
{
if(is_user_connected(nClientIndex))
{
if(TrieKeyExists(g_Access , g_szAuthid[nClientIndex])
return PLUGIN_HANDLED;
new iMoney = cs_get_user_money(nClientIndex);
if(iMoney < iNeedMoney)
return PLUGIN_HANDLED;
cs_set_user_money(nClientIndex , iMoney - iNeedMoney , 1);
set_user_flags(nClientIndex , read_flags(g_szAccessFlags));
TrieSetString(g_Access , g_szAuthid[nClientIndex] , g_szAccessFlags);
client_print(nClientIndex , print_chat , szMessageBuyAccess);
}
return PLUGIN_HANDLED;
}
Pafos писал(а):here is an example buying kick access.
- Код: Выделить всё
#include <amxmodx>
#include <cstrike>
#define MAX_PLAYERS 32
new Trie:g_Access;
new const szMessageBuyAccess[] = "You have buyig Kick access";
new const g_szAccessFlags = "c";
const iNeedMoney = 16000;
new g_szAuthid[MAX_PLAYERS+1][28];
public plugin_init()
{
register_plugin("Buy access" , "1.0" , "Pafos");
register_clcmd("say /kick" , "CmdKick");
g_Access = TrieCreate();
}
public plugin_end()
{
TrieDestroy(g_Access);
}
public client_putinserver(nClientIndex)
{
get_user_authid(nClientIndex , g_szAuthid[nClientIndex] , charsmax(g_szAuthid[]));
if(TrieKeyExists(g_Access , g_szAuthid[nClientIndex])) set_user_flags(nClientIndex , read_flags(g_szAccessFlags));
}
public CmdKick(nClientIndex)
{
if(is_user_connected(nClientIndex))
{
if(TrieKeyExists(g_Access , g_szAuthid[nClientIndex])
return PLUGIN_HANDLED;
new iMoney = cs_get_user_money(nClientIndex);
if(iMoney < iNeedMoney)
return PLUGIN_HANDLED;
cs_set_user_money(nClientIndex , iMoney - iNeedMoney , 1);
set_user_flags(nClientIndex , read_flags(g_szAccessFlags));
TrieSetString(g_Access , g_szAuthid[nClientIndex] , g_szAccessFlags);
client_print(nClientIndex , print_chat , szMessageBuyAccess);
}
return PLUGIN_HANDLED;
}
#include <amxmodx>
#include <cstrike>
#define MAX_PLAYERS 32
new Trie:g_Access;
new const szMessageBuyAccess[] = "You have buyig Kick access";
new const g_szAccessFlags[] = "c";
const iNeedMoney = 16000;
new g_szAuthid[MAX_PLAYERS+1][28];
public plugin_init()
{
register_plugin("Buy access" , "1.0" , "Pafos");
register_clcmd("say /kick" , "CmdKick");
g_Access = TrieCreate();
}
public plugin_end()
{
TrieDestroy(g_Access);
}
public client_putinserver(nClientIndex)
{
get_user_authid(nClientIndex , g_szAuthid[nClientIndex] , charsmax(g_szAuthid[]));
if(TrieKeyExists(g_Access , g_szAuthid[nClientIndex]))
set_user_flags(nClientIndex , read_flags(g_szAccessFlags));
}
public CmdKick(nClientIndex)
{
if(is_user_connected(nClientIndex))
{
if(TrieKeyExists(g_Access , g_szAuthid[nClientIndex]))
return PLUGIN_HANDLED;
new iMoney = cs_get_user_money(nClientIndex);
if(iMoney < iNeedMoney)
return PLUGIN_HANDLED;
cs_set_user_money(nClientIndex , iMoney - iNeedMoney , 1);
set_user_flags(nClientIndex , read_flags(g_szAccessFlags));
TrieSetString(g_Access , g_szAuthid[nClientIndex] , g_szAccessFlags);
client_print(nClientIndex , print_chat , szMessageBuyAccess);
}
return PLUGIN_HANDLED;
}
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 2