Cerere plugin knife-mod

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 .
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

22 Dec 2013, 19:09

hopa ;x wrote:nu am rezolvat x_X
Cand am bagat pluginu lu anaconda pe server si dau /knife primu knife pentru incepatori merge dar ce-l de pro pica server x_X
Si tu posteaza erorile + sursa.
Contact: Activitate scazuta.
Rapidserver
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

22 Dec 2013, 19:18

pluginu care i l-am dat e perfect functional
Last edited by anaconda cs on 21 Jan 2014, 10:06, edited 1 time in total.
Image
Image
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

22 Dec 2013, 21:11

anaconda cs wrote:pluginu care i l-am e perfect functional
Sau NU. mi-a dat sursa, si nu era facut bine precacheul.
Si nu e facut de tine. :P
#define AUTHOR "Freakz nu mai stiu cum."
Contact: Activitate scazuta.
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

22 Dec 2013, 21:38

DnD. Gold wrote:
GhosT *** wrote:vezi asta :
| Afiseaza codul
#include <amxmodx>
#include <colorchat>
#include <fakemeta_util>

#define AUTOR "GhosT"
#define PLUGIN "KNIFE MOD"

#pragma semicolon 1;

new const szTag[] = "[Knife Mod]^x04";

new bool:v_knife[32];

new const v_model[] = "models/knifemod/v_satar.mdl";
new const p_model[] = "models/knifemod/p_satar.mdl";

public plugin_init()
{
	register_plugin(PLUGIN, "1.0", AUTOR);
	
	register_clcmd("say /knife", "menu_shower");
	register_clcmd("say /cutit", "menu_shower");
	register_clcmd("say_team /knife", "menu_shower");
	register_clcmd("say_team /cutit", "menu_shower");
	
	register_event("CurWeapon", "CurWeap", "be", "1=1");
}

native set_user_gravity(index, Float:gravity = 1.0);

public plugin_precache()
{
	precache_model(v_model);
	return PLUGIN_HANDLED;
}
public client_putinserver(id)
{
	v_knife[id] = true;
	set_task(30.0, "mesaj", id);
}
public mesaj(id)
{
	ColorChat(id, GREEN, "%s Pentru a alege un cutit tasteaza /knife in chat !", szTag);
	set_task(30.0, "mesaj", id);
}
public client_disconnect(id)
{
	v_knife[id] = false;
}
public menu_shower(id)
{
	new menu = menu_create("\wKnife Mod", "give_knife");
	
	menu_additem(menu, "\yKnife Incepatori [400 Gravity]", "1", 0);
	menu_additem(menu, "\yKnife Avansati [Normal]", "2", 0);
	menu_addtext(menu, "\yAlege-ti cutitul dorit !", 1);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}
public give_knife(id, item, menu)
{
	if(item == MEXIT_ALL)
	{
		return 1;
	}
	
	new access, callback, data[6], szName[64];
	
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			v_knife[id] = true;
			ColorChat(id, TEAM_COLOR, "%s Ai ales Cutitul pentru jucatori incepatori !", szTag);
			CurWeap(id);
		}
		case 2:
		{
			v_knife[id] = false;
			ColorChat(id, TEAM_COLOR, "%s Ai ales Cutitul pentru jucatori avansati !", szTag);
		}
	}
	menu_destroy(menu);
	return 1;
}
public CurWeap(id)
{
	new Weap = get_user_weapon(id);
	if(Weap == CSW_KNIFE && v_knife[id])
	{
		set_pev(id, pev_viewmodel2, v_model);
		set_pev(id, pev_weaponmodel2, p_model);
		set_user_gravity(id, 400.0);
	}
}
Modelele la satar le bagi in models/knifemod/ :

Modelele trebuie sa fie :
p_satar.mdl si v_satar.mdl
Vezi ca ai uitat p_model la precache. :P
L-am adaugat dupa ce am terminat pluginu ca m-am documentat despre "knife mod" si am vazut ca e si cu p_

Look :
| Afiseaza codul
#include <amxmodx>
#include <colorchat>
#include <fakemeta_util>

#define AUTOR "GhosT"
#define PLUGIN "KNIFE MOD"

#pragma semicolon 1;

new const szTag[] = "[Knife Mod]^x04";

new bool:v_knife[32];

new const v_model[] = "models/knifemod/v_satar.mdl";
new const p_model[] = "models/knifemod/p_satar.mdl";

public plugin_init()
{
	register_plugin(PLUGIN, "1.0", AUTOR);
	
	register_clcmd("say /knife", "menu_shower");
	register_clcmd("say /cutit", "menu_shower");
	register_clcmd("say_team /knife", "menu_shower");
	register_clcmd("say_team /cutit", "menu_shower");
	
	register_event("CurWeapon", "CurWeap", "be", "1=1");
}

native set_user_gravity(index, Float:gravity = 1.0);

public plugin_precache()
{
	precache_model(v_model);
        precache_model(p_model);
	return PLUGIN_HANDLED;
}
public client_putinserver(id)
{
	v_knife[id] = true;
	set_task(30.0, "mesaj", id);
}
public mesaj(id)
{
	ColorChat(id, GREEN, "%s Pentru a alege un cutit tasteaza /knife in chat !", szTag);
	set_task(30.0, "mesaj", id);
}
public client_disconnect(id)
{
	v_knife[id] = false;
}
public menu_shower(id)
{
	new menu = menu_create("\wKnife Mod", "give_knife");
	
	menu_additem(menu, "\yKnife Incepatori [400 Gravity]", "1", 0);
	menu_additem(menu, "\yKnife Avansati [Normal]", "2", 0);
	menu_addtext(menu, "\yAlege-ti cutitul dorit !", 1);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}
public give_knife(id, item, menu)
{
	if(item == MEXIT_ALL)
	{
		return 1;
	}
	
	new access, callback, data[6], szName[64];
	
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			v_knife[id] = true;
			ColorChat(id, TEAM_COLOR, "%s Ai ales Cutitul pentru jucatori incepatori !", szTag);
			CurWeap(id);
		}
		case 2:
		{
			v_knife[id] = false;
			ColorChat(id, TEAM_COLOR, "%s Ai ales Cutitul pentru jucatori avansati !", szTag);
		}
	}
	menu_destroy(menu);
	return 1;
}
public CurWeap(id)
{
	new Weap = get_user_weapon(id);
	if(Weap == CSW_KNIFE && v_knife[id])
	{
		set_pev(id, pev_viewmodel2, v_model);
		set_pev(id, pev_weaponmodel2, p_model);
		set_user_gravity(id, 400.0);
	}
}
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

22 Dec 2013, 21:40

Code: Select all

public plugin_precache()
{
	precache_model(v_model);
	return PLUGIN_HANDLED;
}
Vezi ca nu ai pus:

Code: Select all

precachce_model[b]p_model[/b]
Va cadea serverul.
Contact: Activitate scazuta.
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

22 Dec 2013, 21:41

L-am postat din nou in postul anterior.
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

22 Dec 2013, 21:41

Ghost,nu ii mai da return :) ii dai degeaba , nu te invat de rau :)
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

22 Dec 2013, 21:42

din cate stiu Freakz e comunitate nu autor bot =)))
Image
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

22 Dec 2013, 21:43

anaconda cs wrote:din cate stiu Freakz e comunitate nu autor bot =)))
De ce il faci bot,cand tu ti-ai facut server dupa extreamcs? el incearca sa ajute oameni nerecunoscatori ca tine !
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

22 Dec 2013, 21:48

de pe extreamcs nu am mai mult de 10 plugine ;)
si stai linistit ca sunt si alte surse de documentare de 10 ori mai bune ca extreamcs :))
Last edited by anaconda cs on 22 Dec 2013, 21:49, edited 1 time in total.
Image
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

22 Dec 2013, 21:49

anaconda cs wrote:de pe extreamcs nu am mai mult de 10 plugine ;)
Daca ma uit in paginile din urma gasesc mai mult de 10,in fine .
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

22 Dec 2013, 21:50

conteaza ce am pe server momentan nu cate cereri am si alea
poate am facut, am fost si eu incepator in a face server
cel putin ies bani calumea ;)
Image
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests