Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat][Cerere]ResetPacks
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
407
BlueSkiLz
[Mentally Stable]
Status: Offline
(since 16-07-2019 08:32)
Joined: 18 Oct 2016
Posts: 111
,
Topics: 33
Location:
Romania
Reputation:
34.7
Posted: 12-02-2017, 09:10:33
| Translate post to:
... (
Click for more languages
)
Nume: Resetare packs all
Descriere plugin: acest plugin reseteaza tuturor ammo pack-urile pe care le au..
Alte detalii: -
Exemplu: -
0
0
Back to top
ZPLegendary
[Mentally Stable]
Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142
,
Topics: 7
Location:
Polovragi, GJ
Reputation:
15.4
Votes
: 17
Posted: 12-02-2017, 16:28:12
| Translate post to:
... (
Click for more languages
)
Ca sa setezi creditele tuturor pe 0 scrii zp_credits @ALL 0
Ca sa setezi creditele unei singure persoane pe 0 scrii zp_credits <numele> 0
Ca sa ii dai cuiva credite scrii zp_credits <numele> <cantitatea>
Ca sa dai credite la toti de pe server scrii zp_credits @ALL <cantitatea>
Ca sa iei credite cuiva scrii zp_take_credits <numele> <cantitatea>
Ai mesaje colorate si loguri pentru fiecare transfer.
La sumele peste 1000 iti apare virgula, adica 1,000.
Daca incerci sa iei mai multe credite decat are jucatorul iti va scrie in chat ca nu are atatea credite si va scrie in paranteza cate are.
+ Multe altele
L-am facut pentru serverul meu si nu are niciun fel de problema.
Bafta.
Spoiler:
Code:
#include amxmodx
#include amxmisc
#include ColorChat
#include zombieplague
new cvar_logcommands;
public plugin_init()
{
register_plugin ( "Give/Take Ammo", "1.2", "Legendary" );
cvar_logcommands = register_cvar("zp_logcommands", "1")
register_concmd("zp_credits", "datcredite", ADMIN_MAP, " - <nume> <credite>");
register_concmd("zp_take_credits", "luatcredite", ADMIN_MAP, " - <nume> <credite>");
}
public datcredite(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new arg[32]
read_argv(1, arg, 31)
new player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF)
if (!player)
return PLUGIN_HANDLED
new spower[32], name2[32], name[32]
get_user_name(id, name, 31)
get_user_name(player, name2, 31)
read_argv(2, spower, 31)
new arg2 = str_to_num(spower)
if(arg2 < 0)
{
client_print(id, print_console, "[ZP] Nu poti sa trimiti Numere Negative.");
ColorChat(id, RED, "^4[ZP]^3 Nu poti sa trimiti ^4Numere Negative^3.")
return PLUGIN_HANDLED;
}
static CreditsString[16];
AddCommas(arg2, CreditsString, 15);
if(arg2 == 0)
{
if (player == id)
{
zp_set_user_ammo_packs(id, 0)
ColorChat(id, RED, "^4[ZP]^3 Ti-ai setat ^4Creditele ^3pe^4 0^3.")
client_print(id, print_console, "[ZP] Ti-ai setat Creditele pe 0.");
if(get_pcvar_num(cvar_logcommands))
log_to_file("Give/Take-Ammo.log", "Admin-ul %s si-a setat Creditele pe 0.", name);
}
else
{
if(equal(name2, "@ALL"))
{
zp_set_user_ammo_packs(0, 0)
ColorChat(id, RED, "^4[ZP]^3 Ai setat pe^4 0 ^3Creditele ^4tuturor^3.")
ColorChat(0, RED, "^4[ZP]^3 Admin-ul ^4%s ^3a setat ^4Creditele ^3tuturor pe^4 0^3.", name)
client_print(id, print_console, "[ZP] Ai setat pe 0 Creditele tuturor.");
if(get_pcvar_num(cvar_logcommands))
log_to_file("Give/Take-Ammo.log", "Admin-ul %s a setat pe 0 Creditele tuturor.", name);
}
else
{
zp_set_user_ammo_packs(player, 0)
ColorChat(id, RED, "^4[ZP]^3 I-ai setat pe^4 0 ^3Creditele lui ^4%s^3.", name2)
ColorChat(player, RED, "^4[ZP]^3 Admin-ul ^4%s ^3ti-a setat ^4Creditele ^3pe^4 0^3.", name)
client_print(id, print_console, "[ZP] I-ai setat pe 0 Creditele lui %s.", name2);
if(get_pcvar_num(cvar_logcommands))
log_to_file("Give/Take-Ammo.log", "Admin-ul %s i-a setat pe 0 Creditele lui %s.", name, name2);
}
}
}
else
{
if (player == id)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id)+arg2)
ColorChat(id, RED, "^4[ZP]^3 Ti-ai bagat ^4%s Credite^3.", CreditsString)
client_print(id, print_console, "[ZP] Ti-ai bagat %s Credite.", CreditsString);
if(get_pcvar_num(cvar_logcommands))
log_to_file("Give/Take-Ammo.log", "Admin-ul %s si-a bagat %s Credite.", name, CreditsString);
}
else
{
zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player)+arg2)
ColorChat(id, RED, "^4[ZP]^3 I-ai dat ^4%s Credite^3 lui ^4%s^3.", CreditsString, name2)
ColorChat(player, RED, "^4[ZP]^3 Adminul ^4%s ^3ti-a dat ^4%s Credite^3.", name, CreditsString)
client_print(id, print_console, "[ZP] I-ai dat %s Credite lui %s.", CreditsString, name2);
if(get_pcvar_num(cvar_logcommands))
log_to_file("Give/Take-Ammo.log", "Admin-ul %s i-a dat %s Credite lui %s.", name, CreditsString, name2);
}
}
return PLUGIN_HANDLED;
}
public luatcredite(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new arg[32]
read_argv(1, arg, 31)
new player = cmd_target(id, arg, CMDTARGET_ALLOW_SELF)
if (!player)
return PLUGIN_HANDLED
new spower[32], name2[32], name[32]
get_user_name(id, name, 31)
get_user_name(player, name2, 31)
read_argv(2, spower, 31)
new arg2 = str_to_num(spower)
if(zp_get_user_ammo_packs(player) < arg2)
{
ColorChat(id, RED, "^4[ZP]^3 Suma data depaseste numarul de ^4Credite ^3ale ^4Jucatorului ^3(^4%d^3).", zp_get_user_ammo_packs(player));
client_print(player, print_console, "[ZP] Suma data depaseste numarul de Credite ale Jucatorului (%d).", zp_get_user_ammo_packs(player));
return PLUGIN_HANDLED;
}
if(arg2 <= 0)
{
ColorChat(id, RED, "^4[ZP]^3 Nu poti sa iei mai putin de^4 1 Credit^3.")
client_print(id, print_console, "[ZP] Nu poti sa iei mai putin de 1 Credit.");
return PLUGIN_HANDLED;
}
static CreditsString[16];
AddCommas(arg2, CreditsString, 15);
if (player == id)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id)-arg2)
ColorChat(id, RED, "^4[ZP]^3 Ti-ai luat ^4%s Credite^3.", CreditsString)
client_print(id, print_console, "[ZP] Ti-ai luat %s Credite.", CreditsString);
if (get_pcvar_num(cvar_logcommands))
log_to_file("Give/Take-Ammo.log", "Admin-ul %s si-a luat %s Credite.", name, CreditsString);
}
else
{
zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player)-arg2)
ColorChat(id, RED, "^4[ZP]^3 I-ai luat ^4%s Credite^3 lui ^4%s^3.", CreditsString, name2)
ColorChat(player, RED, "^4[ZP]^3 Adminul ^4%s ^3ti-a luat ^4%s Credite^3.", name, CreditsString)
client_print(id, print_console, "[ZP] I-ai luat %s Credite lui %s.", CreditsString, name2)
if (get_pcvar_num(cvar_logcommands))
log_to_file("Give/Take-Ammo.log", "Admin-ul %s i-a luat %s Credite lui %s.", name, CreditsString, name2);
}
return PLUGIN_HANDLED;
}
AddCommas(iNum , szOutput[] , iLen)
{
static szTmp[15] , iOutputPos , iNumPos , iNumLen;
szTmp[0]='^0',iOutputPos=iNumPos=iNumLen=0;
if (iNum < 0)
{
szOutput[iOutputPos++] = '-';
iNum = abs(iNum);
}
iNumLen = num_to_str(iNum, szTmp, 14);
if (iNumLen <= 3)
{
iOutputPos += copy(szOutput[iOutputPos] , iLen , szTmp);
}
else
{
while ((iNumPos < iNumLen) && (iOutputPos < iLen))
{
szOutput[iOutputPos++] = szTmp[iNumPos++];
if((iNumLen - iNumPos) && !((iNumLen - iNumPos) % 3))
szOutput[iOutputPos++] = ',';
}
szOutput[iOutputPos] = EOS;
}
return iOutputPos;
}
Be the one, not anyone.
Currently working on Zombie Legendary 8.1
0
0
Back to top
BlueSkiLz
[Mentally Stable]
Status: Offline
(since 16-07-2019 08:32)
Joined: 18 Oct 2016
Posts: 111
,
Topics: 33
Location:
Romania
Reputation:
34.7
Posted: 12-02-2017, 19:36:09
| Translate post to:
... (
Click for more languages
)
Mulțam , boss...
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
TheVipera
, 12 February 2017 17:42
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 17-08-2025, 20:30:11
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details