[Cerere] Plugin buy respawn

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
RoCoFeLu
Membru, skill +1
Membru, skill +1
Posts: 284
Joined: 21 Oct 2009, 03:51
Detinator Steam: Nu
Has thanked: 56 times
Been thanked: 6 times

25 May 2012, 11:34

Buna ziua, as dori si eu daca se poate un plugin care sa faca urmatorul lucru:

Cand scri in chat /respawn sau /revive sa te reinvie (respawn). Sa iti dea doar cutitul si 100 HP cand te reinvie.
/respawn sau /revive sa coste 16000$

Mentionez ca pluginul este pentru un server de JailBreak

Va multumesc!
Cu respect: Valy
RoyalServer 2
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

26 May 2012, 00:40

am sa il fac eu maine..
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
User avatar
Rap^
Membru, skill +2
Membru, skill +2
Posts: 621
Joined: 01 Oct 2011, 00:25
Detinator Steam: Da
Reputatie: Fost Scripter eXtreamCS
Fost Super moderator
Location: Bucuresti
Has thanked: 16 times
Been thanked: 156 times

26 May 2012, 14:30

| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <ColorChat>

#pragma semicolon 1

static const PLUGIN[ ]	= "Buy Respawn";
static const VERSION[ ]	= "1.0";
static const AUTHOR[ ]	= "Rap";


new respawn_tag;
new respawn_money;


public plugin_init( )
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_clcmd("say /respawn", "cmdRespawn");
	register_clcmd("say /revive", "cmdRespawn");
	
	respawn_tag = register_cvar("respawn_tag", "[Respawn]");
	respawn_money = register_cvar("respawn_money", "16000");
}
		
public cmdRespawn(id)
{
	if( !is_user_connected(id) ) return PLUGIN_HANDLED;
	
	new szTag[32];
	get_pcvar_string(respawn_tag, szTag, sizeof(szTag) - 1);
	

	if( cs_get_user_team(id) == CS_TEAM_SPECTATOR )
	{
		ColorChat(id, GREY, "^x04%s^x01 Nu poti folosi aceasta comanda cand esti^x03 Spectator^x01.", szTag);
		return PLUGIN_HANDLED;
	}
	if( is_user_alive(id) )
	{
		ColorChat(id, RED, "^x04%s^x01 Nu poti folosi aceasta comanda cand esti^x03 viu^x01.", szTag);
		return PLUGIN_HANDLED;
	}
	if( cs_get_user_money(id) < get_pcvar_num(respawn_money) )
	{
		ColorChat(id, RED, "^x04%s^x01 Nu ai destui bani pentru a folosi comanda respawn. (^x03%d$^x01)", szTag, get_pcvar_num(respawn_money));
		return PLUGIN_HANDLED;
	}
	else if( cs_get_user_money(id) > get_pcvar_num(respawn_money) )
	{
		spawn(id);
		cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(respawn_money), 1);
		
		ColorChat(id, RED, "%s^x01 Comanda^x03 respawn^x01 executata cu succes.", szTag);
		
		set_task(1.0, "SetUserWeapons", id + 12345);
	}
	
	return PLUGIN_HANDLED;	
}
public SetUserWeapons(id)
{
	id -= 12345;
		
	if( !is_user_connected(id) ) return PLUGIN_HANDLED;
	
	strip_user_weapons(id);
	give_item(id, "weapon_knife");
	
	return PLUGIN_CONTINUE;
}
Nu l-am testat, dar daca apare vreun bug sau daca nu merge imi zici :).
Last edited by Rap^ on 26 May 2012, 14:50, edited 5 times in total.
Imagination is more important than knowledge.
Knowledge is limited - Imagination encircles the world.
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

26 May 2012, 14:41

nu mai am de ce sa il fac..a apucat sa il faca Rap^ inaintea mea
oricum al meu iesea ceva 90% asemanator.
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
RoCoFeLu
Membru, skill +1
Membru, skill +1
Posts: 284
Joined: 21 Oct 2009, 03:51
Detinator Steam: Nu
Has thanked: 56 times
Been thanked: 6 times

26 May 2012, 16:39

Va multumesc foarte mult. Am sa il testez si revin cu edit :P

EDIT: Cand dau /respawn, toate bune si frumoase, ma arata in TAB ca sunt viu, imi arata ca, comanda respawn a fost cu succes, dar eu sunt tot spec in modul free lock.
User avatar
sDs|Aragon*
Membru, skill +2
Membru, skill +2
Posts: 576
Joined: 29 Dec 2011, 21:38
Detinator Steam: Da
SteamID: Mihai_Parkour10
Reputatie: Fost scripter eXtreamCS
Has thanked: 4 times
Been thanked: 132 times

26 May 2012, 18:16

Incearca
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1

static const PLUGIN[ ]	= "Buy Respawn";
static const VERSION[ ]	= "1.0";
static const AUTHOR[ ]	= "Rap";


new CvarRespawnTag;
new CvarRespawnCost;

public plugin_init( ) {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_clcmd("say /respawn", "cmdRespawn");
	register_clcmd("say /revive", "cmdRespawn");
	CvarRespawnTag = register_cvar("respawn_tag", "[Respawn]");
	CvarRespawnCost = register_cvar("respawn_cost", "16000");
	}
		
public cmdRespawn(id) {
	if( !is_user_connected(id) ) return PLUGIN_HANDLED;
	
	new szTag[32];
	get_pcvar_string(CvarRespawnTag, szTag, sizeof(szTag) - 1);
	
	if( cs_get_user_team(id) == CS_TEAM_SPECTATOR ) {
	ColorChat(id, "^x03%s^x04 Nu poti folosi aceasta comanda cand esti^x03 Spectator.", szTag);
	return PLUGIN_HANDLED;
	}
	if( is_user_alive(id) ) {
	ColorChat(id, "^x03%s^x04 Nu poti folosi aceasta comanda cand esti^x03 Viu.", szTag);
	return PLUGIN_HANDLED;
	}
	if(cs_get_user_money(id) < get_pcvar_num(CvarRespawnCost)) {
	ColorChat(id, "^x03%s^x04 Nu ai destui bani pentru a folosi comanda respawn.^x03 Necesari: %d$)", szTag, get_pcvar_num(CvarRespawnCost));
	return PLUGIN_HANDLED;
	}
	if(cs_get_user_money(id) > get_pcvar_num(CvarRespawnCost)) {
	ExecuteHamB(Ham_CS_RoundRespawn, id);
	cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(CvarRespawnCost), 1);
	ColorChat(id, "^x03%s^x04 Comanda^x03 respawn^x04 executata cu succes.", szTag);
	set_task(0.5, "SetUserWeapons", id + 12345);
	return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;	
	}
public SetUserWeapons(id) {
	id -= 12345;
		
	if( !is_user_connected(id) ) return PLUGIN_HANDLED;
	
	strip_user_weapons(id);
	give_item(id, "weapon_knife");
	
	return PLUGIN_CONTINUE;
	}
stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
 
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
 
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
	for(new i = 0; i < count; i++) {
	if(is_user_connected(players)) {
	message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
	write_byte(players);
	write_string(msg);
	message_end();
	}
	}
	} 
	}
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

26 May 2012, 20:35

initial asa a fost original.. dar m-am gandit ca nu are rost sa bage hamsandwich pentru doar un spawn.. si sa`l foloseasca pe ala de la fun.. si i-am spus lui rap sa il puna pe ala de la fun..
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
User avatar
sDs|Aragon*
Membru, skill +2
Membru, skill +2
Posts: 576
Joined: 29 Dec 2011, 21:38
Detinator Steam: Da
SteamID: Mihai_Parkour10
Reputatie: Fost scripter eXtreamCS
Has thanked: 4 times
Been thanked: 132 times

26 May 2012, 21:27

sPuf? wrote:initial asa a fost original.. dar m-am gandit ca nu are rost sa bage hamsandwich pentru doar un spawn.. si sa`l foloseasca pe ala de la fun.. si i-am spus lui rap sa il puna pe ala de la fun..
Cel de la Fun are mereu o eroare nu stiu sigur ce.. dar il poate respawna cu acea comanda decat daca pune un set_task la 3 secunde:), mie decat asa imi merge:(, sau mai are unele buguri .. cand il renvie dar sub harta sau deloc..
RoCoFeLu
Membru, skill +1
Membru, skill +1
Posts: 284
Joined: 21 Oct 2009, 03:51
Detinator Steam: Nu
Has thanked: 56 times
Been thanked: 6 times

27 May 2012, 01:45

sDs|Aragon* wrote:Incearca
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1

static const PLUGIN[ ]	= "Buy Respawn";
static const VERSION[ ]	= "1.0";
static const AUTHOR[ ]	= "Rap";


new CvarRespawnTag;
new CvarRespawnCost;

public plugin_init( ) {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_clcmd("say /respawn", "cmdRespawn");
	register_clcmd("say /revive", "cmdRespawn");
	CvarRespawnTag = register_cvar("respawn_tag", "[Respawn]");
	CvarRespawnCost = register_cvar("respawn_cost", "16000");
	}
		
public cmdRespawn(id) {
	if( !is_user_connected(id) ) return PLUGIN_HANDLED;
	
	new szTag[32];
	get_pcvar_string(CvarRespawnTag, szTag, sizeof(szTag) - 1);
	
	if( cs_get_user_team(id) == CS_TEAM_SPECTATOR ) {
	ColorChat(id, "^x03%s^x04 Nu poti folosi aceasta comanda cand esti^x03 Spectator.", szTag);
	return PLUGIN_HANDLED;
	}
	if( is_user_alive(id) ) {
	ColorChat(id, "^x03%s^x04 Nu poti folosi aceasta comanda cand esti^x03 Viu.", szTag);
	return PLUGIN_HANDLED;
	}
	if(cs_get_user_money(id) < get_pcvar_num(CvarRespawnCost)) {
	ColorChat(id, "^x03%s^x04 Nu ai destui bani pentru a folosi comanda respawn.^x03 Necesari: %d$)", szTag, get_pcvar_num(CvarRespawnCost));
	return PLUGIN_HANDLED;
	}
	if(cs_get_user_money(id) > get_pcvar_num(CvarRespawnCost)) {
	ExecuteHamB(Ham_CS_RoundRespawn, id);
	cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(CvarRespawnCost), 1);
	ColorChat(id, "^x03%s^x04 Comanda^x03 respawn^x04 executata cu succes.", szTag);
	set_task(0.5, "SetUserWeapons", id + 12345);
	return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;	
	}
public SetUserWeapons(id) {
	id -= 12345;
		
	if( !is_user_connected(id) ) return PLUGIN_HANDLED;
	
	strip_user_weapons(id);
	give_item(id, "weapon_knife");
	
	return PLUGIN_CONTINUE;
	}
stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
 
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
 
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
	for(new i = 0; i < count; i++) {
	if(is_user_connected(players)) {
	message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
	write_byte(players);
	write_string(msg);
	message_end();
	}
	}
	} 
	}


Am sa-l incerc si revin cu edit. Va multumesc mult!

EDIT: Functioneaza perfect. Va multumesc foarte mult!
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 26 guests