AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   doublekill (https://forums.alliedmods.net/showthread.php?t=41221)

Der_Langsame 07-11-2006 11:51

doublekill
 
1 Attachment(s)
hi
i have a problemm this plugin (multikill.sma) have the sounds multikill,ultrakill.monsterkill and killingspree but i wont only doublekill!
Need Help please
sorry for my bad english

karlos 07-11-2006 14:37

Re: doublekill
 
1 Attachment(s)
you do not have double kill because double kill does not exist

only:
multikill / ultrakill / monsterkill / killingspree

try this version, i added doublekill
make sure you have "misc/doublekill.wav" sound

Der_Langsame 07-11-2006 15:18

Re: doublekill
 
1 Attachment(s)
thx but i have thx problemm

karlos 07-11-2006 18:54

Re: doublekill
 
what you want to say

Der_Langsame 07-12-2006 04:23

Re: doublekill
 
ok i have the problemm (ich habe das problemm behoben es klapp alles)

ch3cker 07-12-2006 16:24

Re: doublekill
 
hmm.. ich schreibs jetzt mal in deutsch, weil ich glaub das ich des net auf englisch hin bekommen würde *schäm*

gibt es einen weg, das man für jeden level (doublekill, multikill ect) ne eigene hud position festlegt. Weil so würde sich die schrift ja immer überschlagen.

Der_Langsame 07-12-2006 16:29

Re: doublekill
 
ja wollte ich auch schon machen aber hab kein plan wie weil wen doublekill und gleichzeitig multikill (3kills(3hs) kommt überschlägt es sich immer,dan noch ne frage kann ich bei der hudmessage von doublekill die farbe in hellblau ändern?
Dan noch was es kommt immer erst doublekill.name
kann ich es so machen das zu erst name:doublekill kommt?

ch3cker 07-12-2006 16:52

Re: doublekill
 
@ Langsamer:
Farbe isch jetzt hellblau und jetzt kommt zuerst der name
Code:

/* AMX Mod script.
*
* (c) Copyright 2002-2003, OLO
* This file is provided as is (no warranties).
*
*/

#include <amxmodx>

new mkills[33][2]

#define LEVELS 5
new levels[LEVELS] = {2,3,4,5,6}
new messages[LEVELS][] = {
        "%s: DoubleKill^nwith %d kills (%d hs)",
        "%s: MultiKill^nwith %d kills (%d hs)",
        "%s: UltraKill^nwith %d kills (%d hs)",
        "%s: MonsterKill^nwith %d kills (%d hs)",
        "%s: KillingSpree^nwith %d kills (%d hs)"
}
new sounds[LEVELS][] = {
        "doublekill",
        "multikill",
        "ultrakill",
        "monsterkill",
        "killingspree"       
}

public deathmsg_event(){
        new killer = read_data(1)
        new victim = read_data(2)
        if (killer&&get_user_team(killer)!=get_user_team(victim)) {
                mkills[killer][0]++
                mkills[killer][1] += read_data(3) /* headshot */
                new param[4]
                param[0] = killer
                param[1] = mkills[killer][0]
                set_task(5.0,"check_mkill",0,param,3)
        }
}

public check_mkill(param[]){
        new id = param[0]
        new ckills = param[1]
        if (ckills != mkills[id][0]) /* still killing */
                return PLUGIN_CONTINUE
        if (ckills >= levels[0]){
                for(new a=0;a<LEVELS;++a)
                        if (ckills == levels[a]){
                                new name[32]
                                get_user_name(id,name,31)
                                set_hudmessage(0, 255, 255, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)       
                                client_cmd(0,"spk misc/%s",sounds[a])
                                show_hudmessage(0,messages[a],name,ckills,mkills[id][1])
                                break
                        }
        }
        mkills[id][0] = 0
        mkills[id][1] = 0
        return PLUGIN_CONTINUE       
}

public client_putinserver(id){
        mkills[id][0] = 0
        mkills[id][1] = 0
        return PLUGIN_CONTINUE       
}

public plugin_init(){
        register_plugin("MultiKill","0.8","default")
        register_event("DeathMsg","deathmsg_event","a")
        return PLUGIN_CONTINUE
}


Der_Langsame 07-12-2006 17:02

Re: doublekill
 
ok danke ich kann ja noch megakill hinzufügen oder? denke schon

Der_Langsame 07-12-2006 17:06

Re: doublekill
 
/* AMX Mod script.
*
* (c) Copyright 2002-2003, OLO
* This file is provided as is (no warranties).
*
*/

#include <amxmodx>

new mkills[33][2]

#define LEVELS 5
new levels[LEVELS] = {2,8}
new messages[LEVELS][] = {
"%s: DoubleKill^nwith %d kills (%d hs)",
"%s: Mega-Kill!^nwith %d kills (%d hs)",

}
new sounds[LEVELS][] = {
"doublekill",
"megakill"
}

public deathmsg_event(){
new killer = read_data(1)
new victim = read_data(2)
if (killer&&get_user_team(killer)!=get_user_team (victim)) {
mkills[killer][0]++
mkills[killer][1] += read_data(3) /* headshot */
new param[4]
param[0] = killer
param[1] = mkills[killer][0]
set_task(5.0,"check_mkill",0,param,3)
}
}

public check_mkill(param[]){
new id = param[0]
new ckills = param[1]
if (ckills != mkills[id][0]) /* still killing */
return PLUGIN_CONTINUE
if (ckills >= levels[0]){
for(new a=0;a<LEVELS;++a)
if (ckills == levels[a]){
new name[32]
get_user_name(id,name,31)
set_hudmessage(0, 255, 255, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)
client_cmd(0,"spk misc/%s",sounds[a])
show_hudmessage(0,messages[a],name,ckills,mkills[id][1])
break
}
}
mkills[id][0] = 0
mkills[id][1] = 0
return PLUGIN_CONTINUE
}

public client_putinserver(id){
mkills[id][0] = 0
mkills[id][1] = 0
return PLUGIN_CONTINUE
}

public plugin_init(){
register_plugin("MultiKill","0.8","default")
register_event("DeathMsg","deathmsg_event","a ")
return PLUGIN_CONTINUE
}


All times are GMT -4. The time now is 08:01.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.