Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
plugin respanw furien
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
931
Djrex12
[Mentally Stable]
Status: Offline
(since 11-06-2018 19:53)
Joined: 07 Jun 2017
Posts: 11
,
Topics: 7
Location:
Romania
Reputation:
17.4
Posted: 14-11-2017, 20:21:45
| Translate post to:
... (
Click for more languages
)
un plugin de respawn pt furien
0
0
Back to top
TwisTer
[GOOGLE SEARCHER]
Status: Offline
(since 17-05-2023 01:23)
Joined: 04 May 2007
Posts: 6962
,
Topics: 147
Location:
Romania
Reputation:
2724.4
Votes
: 231
Posted: 16-11-2017, 23:26:39
| Translate post to:
... (
Click for more languages
)
Nu ai dat prea multe detalii, asa ca doar o sa banuiesc ce doresti :
Spoiler:
Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "CUMPARA VIP RESPAWNBLABLA"
#define VERSION "blabla"
#define AUTHOR "blablablabla"
new cvar_cost, bool: RoundEnd, bool: Used[33];
native get_user_credits(INDEX)
native set_user_credits(INDEX, VALUE)
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
cvar_cost = register_cvar("furien_respawn_cost", "25")
RegisterHam(Ham_Spawn, "player", "HAM_Spawn_Post", 1)
register_logevent("LOGEVENT_RoundStart", 2, "1=Round_Start");
register_logevent("LOGEVENT_RoundEnd", 2, "1=Round_End");
register_logevent("LOGEVENT_RoundEnd", 2, "1&Restart_Round_");
register_clcmd("say /respawn", "CMD_Respawn")
register_clcmd("say_team /respawn", "CMD_Respawn")
}
public HAM_Spawn_Post(id) {
if(is_user_connected(id))
Used[id] = false
}
public LOGEVENT_RoundStart()
RoundEnd = false;
public LOGEVENT_RoundEnd()
RoundEnd = true;
public CMD_Respawn(id) {
if(is_user_connected(id)) {
if(get_user_flags(id) & ADMIN_LEVEL_H) {
if(RoundEnd)
ColorChat(id, "!g[FURIEN]!t Nu poti folosi respawn cand se termina runda.")
else {
new Credits = get_user_credits(id) - get_pcvar_num(cvar_cost)
if(Credits < 0)
ColorChat(id, "!g[FURIEN]!t Nu ai suficiente credite pentru a primi respawn.")
else {
if(Used[id])
ColorChat(id, "!g[FURIEN]!t Ai folosit deja respawn in aceasta runda.")
else {
if(!is_user_alive(id)) {
set_task(1.0, "TASK_Respawn", id)
ColorChat(id, "!g[FURIEN]!t O sa primesti respawn intr-o secunda")
set_user_credits(id, Credits)
Used[id] = true
}
else
ColorChat(id, "!g[FURIEN]!t Nu poti sa iti iei respawn cand esti in viata.")
}
}
}
}
else
ColorChat(id, "!g[FURIEN]!t Doar membrii VIP pot folosi respawn.")
}
}
public TASK_Respawn(id) {
if(!is_user_alive(id) && !RoundEnd) {
ExecuteHamB(Ham_CS_RoundRespawn,id)
ColorChat(id, "!g[FURIEN]!t Ai fost respawnat, spor la joc!")
}
}
stock ColorChat(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^4");
replace_all(msg, 190, "!n", "^1");
replace_all(msg, 190, "!t", "^3");
if(id) players[0] = id;
else get_players(players, count, "ch"); {
for(new i = 0; i < count; i++) {
if(is_user_connected(players[i])) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
0
0
Back to top
luis1
[Mentally Stable]
Status: Offline
(since 16-12-2017 17:06)
Joined: 28 Aug 2017
Posts: 20
,
Topics: 7
Location:
Romania
Reputation:
20.9
Votes
: 1
Posted: 28-11-2017, 21:43:57
| Translate post to:
... (
Click for more languages
)
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Respawn Status"
#define VERSION "1.0"
new g_bStatus;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "FaTzZu")
RegisterHam(Ham_Killed, "player", "Ham_PlayerKilled", 0);
register_clcmd("say /respawn","cmdSayRespawn")
register_clcmd("say_team /respawn","cmdSayRespawn")
}
public cmdSayRespawn(id)
{
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
{
client_print(id, print_chat, "Nu ai acces la comanda !");
return PLUGIN_HANDLED;
}
new szText[192];
new menu = menu_create("Change RESPAWN status", "handlerMenu");
switch(g_bStatus)
{
case true: formatex(szText, 191, "RESPAWN - \\yON")
case false: formatex(szText, 191, "RESPAWN - \\dOFF")
}
menu_additem(menu, szText, "1", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public handlerMenu(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:
{
switch(g_bStatus)
{
case true:
{
g_bStatus = false;
client_print(id, print_chat, "Respawnul a fost dezactivat !");
}
case false:
{
g_bStatus = true;
client_print(id, print_chat, "Respawnul a fost activat !");
}
}
cmdSayRespawn(id);
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public Ham_PlayerKilled(victim, attacker, shouldgib)
{
if(g_bStatus)
set_task(1.0,"Respawn_Player", victim);
}
public Respawn_Player(id)
{
ExecuteHam(Ham_CS_RoundRespawn, id);
}
/respawn in chat e comanda, On oFF doar cei care au flag a au. bafta !
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 28-04-2024, 20:14:40
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