Jump to content


Photo

Vreau Si Eu Sa Modific Un Plugin!


  • Please log in to reply
8 replies to this topic

#1 M0art3a

M0art3a

    Recrut

  • Members
  • Pip
  • 46 posts

Posted 27 January 2008 - 12:22 AM

Vreau si eu amx_who sa apara astfel:

-=Gods=-

-=Semi-Gods=-

-=Mods=-

-=Semi-Mods=-

-=Administrator=-

-=Semi-Administrator=-

-=SlotS=-

Daca nu se poate sa-mi faceti dumneavoastra as dori sa-mi explicati cum se face si o sa fac singur!

App: eu ca sa vad ce admini sunt online pe server dau admin_who Chiar daca este pe AMXMODX!!! am si comanda amx_who dar imi arata altceva!

daca nu se poate modifica pe cea cu admin who imi puteti da una cu amx_who modificata! PlssSSS! Cat ami rpede! :X

#2 pork

pork

    Soldat

  • Members
  • PipPip
  • 333 posts
  • Gender:Male
  • CS Server: sv.cs-pork.ro

Posted 27 January 2008 - 02:27 AM

Da-mi un pm cu id ul tau de mess si rezolvam
Copii daca n-aveti foi rupeti dintr-un caiet dictando!

Gazduire profesionala
Online Tv
Director web

#3 Kimi

Kimi

    Gamer

  • Members
  • PipPipPipPipPip
  • 2,589 posts

Posted 27 January 2008 - 12:43 PM

Pluginul:
#include <amxmodx>
#include <amxmisc>

#define MAX_GROUPS 7

new g_groupNames[MAX_GROUPS][] = {

	"-=Owner=-",
	"-=Semi-Gods=-",
	"-=Mods=-",
	"-=Semi-Mods=-",
	"-=Administrator=-",
	"-=Semi-Administrator=-",
	"-=SlotS=-"
}

new g_groupFlags[MAX_GROUPS][] = {
	"acees 1",
	"acces 2",
	"acces 3",
	"acces 4",
	"acces 5",
	"acces 6",
	"acces 7"
}

new g_groupFlagsValue[MAX_GROUPS]

public plugin_init() {

	register_plugin("AMX Who - AdminMod", "1.0", "KroT@L<>changenINxxbySAMURAI")
	register_concmd("admin_who", "cmdWho", 0)
	for(new i = 0; i < MAX_GROUPS; i++) {
	g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
	}
}

public cmdWho(id) {

	new players[32], inum, player, name[32], i, a
	get_players(players, inum)
	console_print(id, "==========")
	for(i = 0; i < MAX_GROUPS; i++) {
	console_print(id, "-----=====[%d]%s=====-----", i+1, g_groupNames[i])
	for(a = 0; a < inum; ++a) {
		player = players[a]
		get_user_name(player, name, 31)
		if(get_user_flags(player) == g_groupFlagsValue[i]) {
			console_print(id, "%s", name)
			}
		}
	}

	console_print(id, "------")
	return PLUGIN_HANDLED
}
In loc de acces 1, acces 2, iti pui tu accesele dorite iar apoi intri in "addons/amxmodx/scripting/admincmd.sma" si pui "//" in fata la linia:
register_concmd("amx_who", "cmdWho", ADMIN_ADMIN, "- displays who is on server")^
Apoi compilezi "admincmd.sma" si pui "admincmd.amxx" rezultat in folderul plugins peste celalalt. La fel si cu pluginul acesta. Cam atat ! :smile:

PS: pork vezi ca PM-urile sunt dezactivate ! :P

Edited by kimi, 27 January 2008 - 12:43 PM.


#4 pork

pork

    Soldat

  • Members
  • PipPip
  • 333 posts
  • Gender:Male
  • CS Server: sv.cs-pork.ro

Posted 27 January 2008 - 04:51 PM

Aaaa...well sry nu stiam asta, e bun k ai raspuns tu;) nasol k sunt dezactivate pm-urile ma intreb de ce??
Copii daca n-aveti foi rupeti dintr-un caiet dictando!

Gazduire profesionala
Online Tv
Director web

#5 M0art3a

M0art3a

    Recrut

  • Members
  • Pip
  • 46 posts

Posted 27 January 2008 - 10:34 PM

Pluginul:

#include <amxmodx>
#include <amxmisc>

#define MAX_GROUPS 7

new g_groupNames[MAX_GROUPS][] = {

	"-=Owner=-",
	"-=Semi-Gods=-",
	"-=Mods=-",
	"-=Semi-Mods=-",
	"-=Administrator=-",
	"-=Semi-Administrator=-",
	"-=SlotS=-"
}

new g_groupFlags[MAX_GROUPS][] = {
	"acees 1",
	"acces 2",
	"acces 3",
	"acces 4",
	"acces 5",
	"acces 6",
	"acces 7"
}

new g_groupFlagsValue[MAX_GROUPS]

public plugin_init() {

	register_plugin("AMX Who - AdminMod", "1.0", "KroT@L<>changenINxxbySAMURAI")
	register_concmd("admin_who", "cmdWho", 0)
	for(new i = 0; i < MAX_GROUPS; i++) {
	g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
	}
}

public cmdWho(id) {

	new players[32], inum, player, name[32], i, a
	get_players(players, inum)
	console_print(id, "==========")
	for(i = 0; i < MAX_GROUPS; i++) {
	console_print(id, "-----=====[%d]%s=====-----", i+1, g_groupNames[i])
	for(a = 0; a < inum; ++a) {
		player = players[a]
		get_user_name(player, name, 31)
		if(get_user_flags(player) == g_groupFlagsValue[i]) {
			console_print(id, "%s", name)
			}
		}
	}

	console_print(id, "------")
	return PLUGIN_HANDLED
}
In loc de acces 1, acces 2, iti pui tu accesele dorite iar apoi intri in "addons/amxmodx/scripting/admincmd.sma" si pui "//" in fata la linia:
register_concmd("amx_who", "cmdWho", ADMIN_ADMIN, "- displays who is on server")^
Apoi compilezi "admincmd.sma" si pui "admincmd.amxx" rezultat in folderul plugins peste celalalt. La fel si cu pluginul acesta. Cam atat ! :smile:

PS: pork vezi ca PM-urile sunt dezactivate ! :P


eu nu am admincmd.sma in scripting! :(( Pls! Help Me! Uite iti las ID-ul meu de mess aici! : M0art3a.cstrike Astept AjuToR! PLSSS

#6 pork

pork

    Soldat

  • Members
  • PipPip
  • 333 posts
  • Gender:Male
  • CS Server: sv.cs-pork.ro

Posted 28 January 2008 - 12:11 AM

:)) pai taica nu tre sa il ai...ce ti-a dat kimi acolo il copiezi intr-un fisier text(click dreapta new text document) pe care il denumesti admincmd.sma sau cum vrei tu numa sa fie .sma pe care il compilezi cu compileru din scripting si iti va rezulta un fisier.amxx(adik pluginul) pe care il pui in plugins si il declari in plugins.ini
Copii daca n-aveti foi rupeti dintr-un caiet dictando!

Gazduire profesionala
Online Tv
Director web

#7 Juvenille

Juvenille

    Soldat

  • Members
  • PipPip
  • 154 posts
  • Gender:Male
  • Location:Brasov
  • CS Server: cs.addicted2.ro

Posted 28 January 2008 - 12:51 AM

shi unde apare pluginu ala .amxx ? ca mie nu imi apare nik ...

Edited by Juvenille, 28 January 2008 - 12:51 AM.

Posted Image

#8 Kimi

Kimi

    Gamer

  • Members
  • PipPipPipPipPip
  • 2,589 posts

Posted 28 January 2008 - 02:24 PM

pork nu prosti omu` :P Deci trebuie sa ai admincmd.sma in scripting ca doar e plugin de baza. Reistaleaza amxmodx daca nu si o sa iti apara. Iar ce ti-am dat il pui intr-un New Text Document" dai Save As -> amx_who.sma si il salvezi in scripting. Dupa ce ai modificat admincmd.sma asa cum ti-am zis mai sus (e obligatoriu ca sa functioneze pluginul) deschizi aplicatia "compile" iar dupa ce termina gasesti puginurile in folderul "compiled". De acolo iei admincmd.amxx si amx_who.amxx si le pui il folderul plugins. :smile:

#9 pork

pork

    Soldat

  • Members
  • PipPip
  • 333 posts
  • Gender:Male
  • CS Server: sv.cs-pork.ro

Posted 28 January 2008 - 04:43 PM

:))pai nu prostesc deloc omul...yo unu nu am modificat nimic in admincmd.sma ci doar din amx_who.sma am modificat k sa mearga pe comanda admin_who in loc de amx_who, si e bun si asa si asa;)uitasem doar sa ii spun sa se uite in folderul compiled, desi era oarecum logic;))
Copii daca n-aveti foi rupeti dintr-un caiet dictando!

Gazduire profesionala
Online Tv
Director web




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users