register_logevent("Samobojstwo", 2, "") //a dalej;p?
P.S.czym różni się
return PLUGIN_HANDLED;od
return PLUGIN_CONTINUE;
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.
|
Napisano 19.08.2009 21:09
return PLUGIN_HANDLED;od
return PLUGIN_CONTINUE;
Napisano 20.08.2009 13:42
register_logevent("killed_himself",3,"1=committed suicide with","2=world")
Napisano 20.08.2009 13:49
Napisano 20.08.2009 14:00
public funkcja(id)
{
if(is_user_alive(id))
{
client_print(id, print_chat, "jestes zywy")
return PLUGIN_CONTINUE
}
client_print(id, print_chat, "jestes niezywy")
return PLUGIN_CONTINUE
}
public funkcja2(id)
{
if(is_user_alive(id))
{
client_print(id, print_chat, "jestes zywy")
return PLUGIN_CONTINUE
}
else
{
client_print(id, print_chat, "jestes niezywy")
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public funkcja3(id)
{
if(is_user_alive(id))
{
client_print(id, print_chat, "jestes zywy")
}
else
{
client_print(id, print_chat, "jestes niezywy")
}
return PLUGIN_CONTINUE
} wszystko tak samo działa.
Napisano 20.08.2009 14:02
public funkcja(id)
{
if(is_user_alive(id))
{
client_print(id, print_chat, "jestes zywy")
return PLUGIN_CONTINUE //następny client_print się wykona? jak dam HANDLED to tutaj kończy się cała funkcja?
}
client_print(id, print_chat, "jestes niezywy")
return PLUGIN_CONTINUE
}
Napisano 20.08.2009 14:12
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say siema", "hello")
// Add your code here...
}
public hello(id)
{
if(is_user_alive(id))
{
client_print(id, print_chat, "Witaj, jestes zywy")
return PLUGIN_CONTINUE
}
client_print(id, print_chat, "Witaj, jestes niezywy")
return PLUGIN_CONTINUE
} Po napisaniu "Siema" wyświetli pierw witaj, jesteś xxx, a następnie słowo "siema" napisane przez gracza. Gdy będzie /* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say siema", "hello")
// Add your code here...
}
public hello(id)
{
if(is_user_alive(id))
{
client_print(id, print_chat, "Witaj, jestes zywy")
return PLUGIN_HANDLED
}
client_print(id, print_chat, "Witaj, jestes niezywy")
return PLUGIN_HANDLED
} pokaże się samo witaj, jestes xxx
Napisano 20.08.2009 14:34
Napisano 20.08.2009 15:11
Napisano 20.08.2009 16:47
Po sekundzie przestaje byc aktualny to nie wyrobisz sie z usunieciem go
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#define PLUGIN "ttkill"
#define VERSION "1.0"
#define AUTHOR "naven"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "DeathMsg", "a", "1=0")
}
public DeathMsg(id){
//if(cs_get_user_team(id) == CS_TEAM_T)
//new imie [32]
//get_user_name(id, imie, 31)
//if (is_user_connected(id))
ColorChat(0, GREEN, " zostaje zabity za samobojstwo w poprzedniej rundzie")
set_task(1.0, "zabij", id)
}
public zabij(id){
new name [32]
get_user_name(id, name, 31)
//if (is_user_connected(id))
ColorChat(0, GREEN, "%s zostaje zabity za samobojstwo w poprzedniej rundzie", name)
user_kill(id)
}
Napisano 20.08.2009 18:43
Napisano 20.08.2009 19:08
Napisano 20.08.2009 19:14
new tablica[ilość_elementów];
Napisano 20.08.2009 19:31
new Array:tablica;
Napisano 20.08.2009 19:43
new Array:tablica;
Napisano 20.08.2009 19:49
Ale w sumie to tylko wskaźnik, bo tablica nie została jeszcze utworzona.daj mu spokój na początek z dynamicznymi tablicami :>
Napisano 20.08.2009 22:19
Bez przesady ;> , zwykła 33-elementowa tablica bool: czy _: jest tu wystarczająca.Ale w sumie to tylko wskaźnik, bo tablica nie została jeszcze utworzona.
Napisano 21.08.2009 14:04
Napisano 21.08.2009 15:40
Napisano 21.08.2009 18:29
#include <amxmodx>
#include <celltrie>
#include <hamsandwich>
#include <cstrike>
#include <colorchat>
#define PLUGIN "ttkill"
#define VERSION "1.02"
#define AUTHOR "naven"
#define TASK_ID 12345
new const gszValidWeapons[][]={
"grenade",
"tank",
"vehicle"
}
new Trie:TrieWeaponNames;
new bool:gbUser2Kill[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("DeathMsg", "DeathMsg", "a");
RegisterHam(Ham_Spawn, "player", "fwSpawn", 1);
TrieWeaponNames = TrieCreate();
for(new i=0;i<sizeof gszValidWeapons;i++)
TrieSetCell(TrieWeaponNames,gszValidWeapons[i],i);
}
public fwSpawn(id){
if(gbUser2Kill[id])
set_task(0.2, "zabij",id+TASK_ID);
}
public DeathMsg(){
new kid=read_data(1);
new id=read_data(2);
new szWeapon[8];
read_data(4, szWeapon, 7);
if((TrieKeyExists(TrieWeaponNames, szWeapon) && kid==id) || kid==0)
if(!gbUser2Kill[id] && cs_get_user_team(id) == CS_TEAM_T)
gbUser2Kill[id]=true;
}
public zabij(id){
id-=TASK_ID;
user_kill(id);
new name [32]
get_user_name(id, name, 31)
ColorChat(0, RED, "^x01Gracz^x03 %s^x01 zostaje ukarany za^x04 samobojstwo^x01 w poprzedniej rundzie", name)
gbUser2Kill[id]=false;
}new const gszValidWeapons[][]={
"grenade",
"tank",
"vehicle"
}Tutaj możesz wpisać wszystkie nazwy broni, które uznawane są jako samobójstwo.
Napisano 21.08.2009 19:41
0 użytkowników, 1 gości, 0 anonimowych