Plugin-uri[Plugin UltraCS] Detalii în motd [NEW]

Moderatori: Moderators, Founder

Mesaj

Avatar utilizator
CEO
Posts
3802
Descriere: Cu ajutorul acestui plugin puteți să adăugați motd-uri pe server fără să mai băgați un fișier .html în configs,totul se face din sma.MULT MAI SIMPLU !

Descărcare: SURSA

Cod: Selectaţi tot

#include

#define ADVERTISING_TIME 149.0


stock const messages[][] = {

"Vrei sa vezi comenzile utile de pe server? Tasteaza /comenzi !"
}

public plugin_init()  {
   register_plugin("Comenzi Utile", "1.0", "Challenger.");
   register_clcmd("say /preturi", "preturi");
   register_clcmd("say /beneficii", "BeneficiiVip");
   register_clcmd("say /donatii", "Donatii");
   register_clcmd("say /comenzi", "Comenzi");
   set_task(ADVERTISING_TIME, "show_messages", _, _, _,"b");
}

public preturi(id)
{

static motd[  2500  ];
new len = formatex( motd, sizeof ( motd )  - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "PRETURI GRADE:


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Fondator - 15 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Owner - 12 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Co-Owner - 10 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "God - 8 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Administrator - 6 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Moderator - 4 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Helper - 2 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Slot - 1 €.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "
"  );

show_motd(  id,  motd,  "Preturi Grade");
return 1;
}

public BeneficiiVip(id)
{

static motd[  2500  ];
new len = formatex( motd, sizeof ( motd )  - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "BENEFICII V.I.P:


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Primiti 150 HP& AP la fiecare spawn.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Primiti 10 HP&AP/Kill , 15HP&AP/HeadShot.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Primiti 1000$/Kill , 1500$/HeadShot.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Aveti acces la armele pentru VIP (/vmenu).
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Puteti sari de 2 ori.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Apari ca VIP in TabScore
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "La fiecare spawn primiti SET GRENADE.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "
"  );

show_motd(  id,  motd,  "Beneficii V.I.P");
return 1;
}

public Donatii(id)
{

static motd[  2500  ];
new len = formatex( motd, sizeof ( motd )  - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "DONATII SERVER:


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Toate DONATIILE se fac la id-ul:
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "Y[!]M:Quit_Step (Challenger.).
"  );

len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "
"  );

show_motd(  id,  motd,  "Contact");
return 1;
}

public Comenzi(id)
{

static motd[  2500  ];
new len = formatex( motd, sizeof ( motd )  - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, ""  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "COMENZI UTILE


"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "/preturi - Arata preturile gradelor.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "/beneficii - Arata beneficiiile VIP-ului.
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "/donatii - Arata id-ul si nick-ul detinatorului..
"  );
len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "/comenzi - Arata comenzile utile din chat..
"  );

len += format(  motd[ len ],  sizeof ( motd ) - len - 1, "
"  );

show_motd(  id,  motd,  "Contact");
return 1;
}
public show_messages()
{
new Buffer[256];
formatex(Buffer, sizeof Buffer - 1, "^x02%s", messages[random(sizeof messages)]);

new players[32], num, id;
get_players(players, num);

for(new i = 0 ; i < num ; i++)
{
id = players[i]

message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
write_byte(id);
write_string(Buffer);
message_end();
}
}
Nume: Comenzi Utile
Versiune: 1.0
Autor: Challenger.

Instalare:
1. Fișierul comenzi_utile.sma îl puneți in addons/amxmodx/scripting
2. Fișierul comenzi_utile.amxx îl puneți in addons/amxmodx/plugins
3. Intrați în fișierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Cod: Selectaţi tot

comenzi_utile.amxx
4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
-

Comenzi administrative (se tastează în consolă și trebuie să fiți administrator):
-
Comenzi publice (se tastează în joc prin apăsarea tastei Y):

Cod: Selectaţi tot

/preturi - Arată prețurile gradelor
/beneficii - Arată beneficiile VIP-ului
/donatii - Arată id-ul și nick-ul deținătorului
/comenzi - Arată toate aceste comenzi.
Module necesare (se șterge ; din fața modulului de mai jos; acestea le gasiți în fișierul amxmodx\configs\modules.ini):
========================
CONTACT : diliulro@yahoo.com
========================
Scrie răspuns