Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

Przerobienie pluginu.. zastosowanie koloru w say

Modyfikacja

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 FIN Turbia

    Nowy

  • Pijawka

Reputacja: 0
zer0.

  • Postów:1
  • Lokalizacja:StW
Offline

Napisano 19.01.2012 18:56



/*
==========================================================================================
*** Player Wanted ***
author: Nightscream
msn: pipo1568@hotmail.com

Version: 1.1
==========================================================================================
Credits: Kleenex: for fixing and helping me
V3X: for giving me the most kill script
==========================================================================================
### Cvars ###
wanted_start "1000" This is the start money that is set on the wanted player
wanted_extra "500" This is the money that will increase the wanted money for every
round the top player suvives
==========================================================================================
### Modules ###
Cstrike required
==========================================================================================
### Tested On ###
Listen server | Condition zero | Windows XP | AMXX 1.71
==========================================================================================
### Suggestions ###
Got some suggestions
post them in the topic or in pm me
==========================================================================================
### Changelog ###
1.0 Release
1.1 Added Top players won't get wanted money
*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Player Wanted"
#define VERSION "1.1"
#define AUTHOR "Nightscream"
new gSurvived[33]
new gTop_terror
new gTop_ct
new gOldTerror
new gOldct
new gWantedmoney

public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR );

register_cvar( "wanted_start", "1000")
register_cvar( "wanted_extra", "500");

register_event( "DeathMsg" , "on_death" , "a" );

register_logevent( "event_roundstart", 2, "0=World triggered", "1=Round_Start" );
register_logevent( "event_roundend", 2, "0=World triggered", "1=Round_End" );
}
public event_roundstart() {

gTop_terror = getMostKills( CS_TEAM_T );
gTop_ct = getMostKills( CS_TEAM_CT );

if( gTop_terror != gOldTerror ) {
gSurvived[gTop_terror] = 0;
}
if( gTop_ct != gOldct ) {
gSurvived[gTop_ct] = 0;
}

new Tname[32], CTname[32];
get_user_name( gTop_terror, Tname, 31 );
get_user_name( gTop_ct, CTname, 31 );

client_print( 0, print_chat, "[AMXX]CT %s is wanted | T %s is wanted", CTname, Tname );

return PLUGIN_CONTINUE
}
public on_death( id ) {
new killer_id = read_data( 1 ); //Killer id
new victim_id = read_data( 2 ); //Victim id

if( killer_id == gTop_terror || killer_id == gTop_ct ) return PLUGIN_CONTINUE

if( gTop_terror == victim_id ) {
new kname[32], vname[32];
get_user_name( killer_id, kname, 31 ); //get killer name
get_user_name( gTop_terror, vname, 31 ); //get victim name

new money = cs_get_user_money( killer_id );
cs_set_user_money( killer_id, money + gWantedmoney );

client_print( 0, print_center, "[AMXX] %s has killed Terrorist %s, he received %i", kname, vname, gWantedmoney );
}
if( gTop_ct == victim_id ) {
new kname[32], vname[32]
get_user_name( killer_id, kname, 31 ); //get killer name
get_user_name( gTop_ct, vname, 31 ); //get victim name

new money = cs_get_user_money( killer_id );

cs_set_user_money( killer_id, money + gWantedmoney );

client_print( 0, print_center, "[AMXX] %s has killed Counter-Terrorist %s, he received %i", kname, vname, gWantedmoney );
}

return PLUGIN_CONTINUE
}
public event_roundend() {

if( is_user_alive( gTop_terror ) ) {
gSurvived[gTop_terror]++
checkwantedmoney( gTop_terror )

}else {
gSurvived[gTop_terror] = 0;
checkwantedmoney( gTop_terror )
}
if( is_user_alive( gTop_ct ) ) {
gSurvived[gTop_ct]++
checkwantedmoney( gTop_ct )
}else {
gSurvived[gTop_ct] = 0;
checkwantedmoney( gTop_ct )
}

gOldTerror = gTop_terror;
gOldct = gTop_ct;

client_print( 0, print_chat[color=#666600],
[color=#000000] [/color][color=#008800]"[AMXX] top T survived: %i times | top CT survived: %i times"[/color][color=#666600],[/color][color=#000000] gSurvived[/color][color=#666600][[/color][color=#000000]gTop_terror[/color][color=#666600]],[/color][color=#000000] gSurvived[/color][color=#666600][[/color][color=#000000]gTop_ct[/color][color=#666600]][/color][color=#000000] [/color][color=#666600]);[/color]

[color=#000088]return[/color][color=#000000] PLUGIN_CONTINUE
[/color][color=#666600]}[/color]
[color=#000088]public[/color][color=#000000] checkwantedmoney[/color][color=#666600]([/color][color=#000000] id [/color][color=#666600])[/color][color=#000000] [/color][color=#666600]{[/color]
[color=#000088]new[/color][color=#000000] wmoney [/color][color=#666600]=[/color][color=#000000] get_cvar_num[/color][color=#666600]([/color][color=#000000] [/color][color=#008800]"wanted_start"[/color][color=#000000] [/color][color=#666600]);[/color]
[color=#000088]new[/color][color=#000000] extramoney [/color][color=#666600]=[/color][color=#000000] get_cvar_num[/color][color=#666600]([/color][color=#000000] [/color][color=#008800]"wanted_extra"[/color][color=#000000] [/color][color=#666600]);[/color]
[color=#000000]gWantedmoney [/color][color=#666600]=[/color][color=#000000] wmoney [/color][color=#666600]+[/color][color=#000000] [/color][color=#666600]([/color][color=#000000]extramoney [/color][color=#666600]*[/color][color=#000000] gSurvived[/color][color=#666600][[/color][color=#000000]id[/color][color=#666600]]);[/color]
[color=#666600]}[/color]
[color=#000088]public[/color][color=#000000] getMostKills[/color][color=#666600]([/color][color=#000000] [/color][color=#660066]CsTeams[/color][color=#666600]:[/color][color=#000000]team [/color][color=#666600])[/color]
[color=#666600]{[/color]
[color=#000000] [/color][color=#000088]new[/color][color=#000000] maxPlayers [/color][color=#666600]=[/color][color=#000000] get_maxplayers[/color][color=#666600]();[/color]
[color=#000000] [/color][color=#000088]new[/color][color=#000000] mostkills[/color][color=#666600][[/color][color=#006666]2[/color][color=#666600]][/color][color=#000000] [/color][color=#666600]=[/color][color=#000000] [/color][color=#666600]{[/color][color=#000000] [/color][color=#006666]0[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]0[/color][color=#000000] [/color][color=#666600]};[/color][color=#000000] [/color][color=#880000]// 0 = id, 1 = frags[/color]
[color=#000000] [/color][color=#000088]for[/color][color=#666600]([/color][color=#000000] [/color][color=#000088]new[/color][color=#000000] i [/color][color=#666600]=[/color][color=#000000] [/color][color=#006666]1[/color][color=#666600];[/color][color=#000000] i [/color][color=#666600]<=[/color][color=#000000] maxPlayers[/color][color=#666600];[/color][color=#000000] i[/color][color=#666600]++[/color][color=#000000] [/color][color=#666600])[/color]
[color=#000000] [/color][color=#666600]{[/color]
[color=#000000] [/color][color=#000088]if[/color][color=#666600]([/color][color=#000000] [/color][color=#666600]![/color][color=#000000]is_user_connected[/color][color=#666600]([/color][color=#000000] i [/color][color=#666600])[/color][color=#000000] [/color][color=#666600]||[/color][color=#000000] cs_get_user_team[/color][color=#666600]([/color][color=#000000] i [/color][color=#666600])[/color][color=#000000] [/color][color=#666600]!=[/color][color=#000000] team [/color][color=#666600])[/color]
[color=#000000] [/color][color=#000088]continue[/color][color=#666600];[/color]
[color=#000000] [/color][color=#000088]new[/color][color=#000000] frags [/color][color=#666600]=[/color][color=#000000] get_user_frags[/color][color=#666600]([/color][color=#000000] i [/color][color=#666600]);[/color]
[color=#000000] [/color][color=#000088]if[/color][color=#666600]([/color][color=#000000] frags [/color][color=#666600]>[/color][color=#000000] mostkills[/color][color=#666600][[/color][color=#006666]1[/color][color=#666600]][/color][color=#000000] [/color][color=#666600])[/color]
[color=#000000] [/color][color=#666600]{[/color]
[color=#000000] mostkills[/color][color=#666600][[/color][color=#006666]1[/color][color=#666600]][/color][color=#000000] [/color][color=#666600]=[/color][color=#000000] frags[/color][color=#666600];[/color]
[color=#000000] mostkills[/color][color=#666600][[/color][color=#006666]0[/color][color=#666600]][/color][color=#000000] [/color][color=#666600]=[/color][color=#000000] i[/color][color=#666600];[/color]
[color=#000000] [/color][color=#666600]}[/color]
[color=#000000]
[/color][color=#666600]}[/color]
[color=#000000] [/color][color=#000088]return[/color][color=#000000] mostkills[/color][color=#666600][[/color][color=#006666]0[/color][color=#666600]];[/color][color=#000000]
[/color][color=#666600]}[/color][color=#000000] [/color]

1client_print( 0, print_chat, "[AMXX]CT %s is wanted | T %s is wanted", CTname, Tname );
2client_print( 0, print_center, "[AMXX] %s has killed Terrorist %s, he received %i", kname, vname, gWantedmoney );
3client_print( 0, print_center, "[AMXX] %s has killed Counter-Terrorist %s, he received %i", kname, vname, gWantedmoney );
4client_print( 0, print_chat, "[AMXX] top T survived: %i times | top CT survived: %i times", gSurvived[gTop_terror], gSurvived[gTop_ct] );





Chcialbym aby te to wygladalo tak jak ponizej...

[color=#333333]1"[/color][color=#00FF00][Poscig][/color][color=#FF0000]CT %s jest poszukiwany [/color][color=#00FF00]|[/color][color=#0000FF] TT %s jest poszukiwany[/color][color=#333333]"[/color]
[color=#333333]2"[/color][color=#00FF00][Poscig] [/color][color=#0000FF]%s zabil poszukiwanego TT %s[/color][color=#00FF00],[/color][color=#0000FF] otrzymal %i"[/color]
[color=#333333]3"[/color][color=#00FF00][Poscig] [/color][color=#FF0000]%s zabil poszukiwanego CT %s[/color][color=#00FF00],[/color][color=#FF0000] otrzymal %i"[/color]
[color=#333333]4"[/color][color=#00FF00][Poscig][/color][color=#0000FF]^x03top TT przezyl: %i razy[/color][color=#00FF00]|[/color][color=#FF0000]top CT przezyl: %i razy[/color][color=#333333]"[/color]


[color=#333333][Poscig] wiem ze moze byc zielony, ale co do koloru nie wiem czy da sie tak jak powyzej na niebiesko .. jesli nie to moze byc team kolor...[/color][/color]

co jest zle kody chcialem edytowac i sie nie da lol..

[color=#282828][Poscig][/color][color=#282828][/color][color=#0000FF][/color][color=#282828]^x03top TT przezyl: %i razy[/color][color=#282828][/color][color=#00FF00][/color][color=#282828]|[/color][color=#282828][/color][color=#FF0000][/color][color=#282828]top CT przezyl: %i razy[/color][color=#282828][/color][color=#333333][/color][color=#282828]"[/color][color=#282828][/color][/color]
  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych