-
Postów
6 -
Dołączył
-
Ostatnia wizyta
Odpowiedzi opublikowane przez Kamil?
-
-
sprawa juz rozwiazana, jedno IN_USE za duzo ?
-
Spoiler
public OnPluginStart()
{
CreateConVar(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
cvar_proporcja_punktow = CreateConVar("cod_points_level", "2");
//--------------------------------------------------------------------------------
// cvar_doswiadczenie_za_zabojstwo = CreateConVar("cod_xp_kill", "x");
// cvar_doswiadczenie_za_zabojstwo_hs = CreateConVar("cod_xp_killhs", "x");
// cvar_doswiadczenie_za_obrazenia = CreateConVar("cod_xp_damage", "x");
// cvar_doswiadczenie_za_wygrana_runde = CreateConVar("cod_xp_winround", "x");
// cvar_doswiadczenie_za_cele_mapy = CreateConVar("cod_xp_objectives", "x");
// cvar_limit_poziomu = CreateConVar("cod_max_level", "x");
// cvar_proporcja_poziomu = CreateConVar("cod_level_ratio", "x");
// cvar_proporcja_punktow = CreateConVar("cod_points_level", "x"); -- x sa umyslnie dane --
//--------------------------------------------------------------------------------RegConsoleCmd("klasa", WybierzKlase);
RegConsoleCmd("class", WybierzKlase);
RegConsoleCmd("klasy", OpisKlas);
RegConsoleCmd("classinfo", OpisKlas);
RegConsoleCmd("items", OpisItemow);
RegConsoleCmd("perks", OpisItemow);
RegConsoleCmd("perki", OpisItemow);
RegConsoleCmd("item", OpisItemu);
RegConsoleCmd("perk", OpisItemu);
RegConsoleCmd("wyrzuc", WyrzucItem);
RegConsoleCmd("useclass", UzyjKlasy);
RegConsoleCmd("useitem", UzyjItemu);
RegConsoleCmd("useperk", UzyjItemu);
RegConsoleCmd("statystyki", PrzydzielPunkty);
RegConsoleCmd("staty", PrzydzielPunkty);
RegConsoleCmd("reset", ResetujPunkty);RegConsoleCmd("buy", BlokujKomende);
RegConsoleCmd("buyequip", BlokujKomende);
RegConsoleCmd("buyammo1", BlokujKomende);
RegConsoleCmd("buyammo2", BlokujKomende);
RegConsoleCmd("rebuy", BlokujKomende);
RegConsoleCmd("autobuy", BlokujKomende);HookEvent("round_freeze_end", PoczatekRundy);
HookEvent("round_start", NowaRunda);
HookEvent("round_end", KoniecRundy);HookEvent("hostage_rescued", ZakladnikUratowany);
HookEvent("bomb_defused", BombaRozbrojona);
HookEvent("bomb_planted", BombaPodlozona);HookEvent("player_spawn", OdrodzenieGracza);
HookEvent("player_death", SmiercGracza);HookUserMessage(GetUserMessageId("TextMsg"), TextMessage, true);
LoadTranslations("common.phrases");nazwy_klas[0] = "Brak";
opisy_klas[0] = "Brak dodatkowych uzdolnien";
bronie_klas[0] = "";
inteligencja_klas[0] = 0;
zdrowie_klas[0] = 100;
obrazenia_klas[0] = 0;
wytrzymalosc_klas[0] = 0;
kondycja_klas[0] = 100;nazwy_itemow[0] = "Brak";
opisy_itemow[0] = "Zabij kogos, aby otrzymac item";CreateConVar("sm_tag_version", "1.0", "[TAG] Admin [CS:GO]", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
Tagsay = CreateConVar("sm_tag_say", "1", "Tagi COD/VIP/LVL", FCVAR_NONE, true, 0.0, true, 1.0);
AutoExecConfig(true, "sm_tag_admin");RegConsoleCmd("say", Command_SendToAll);
RegConsoleCmd("say_team", Command_SendToTeam);
}Spoilerpublic Action:UzyjKlasy(client, args)
{
if(!(!IsPlayerAlive(client) || freezetime) && GetClientButtons(client) & IN_USE)
{
new Function:forward_klasy = GetFunctionByName(pluginy_klas[klasa_gracza[client]], "cod_class_skill_used");
if(forward_klasy != INVALID_FUNCTION)
{
Call_StartFunction(pluginy_klas[klasa_gracza[client]], forward_klasy);
Call_PushCell(client);
Call_PushCell(klasa_gracza[client]);
Call_Finish();
}
}return Plugin_Handled;
}To wszystko
-
Spoiler
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#include <codmod>
#include <cstrike>new const String:nazwa[] = "Wsparcie Ogniowe";
new const String:opis[] = "Posiada dwie rakiety zadajace 50 (+inteligencja) obrazen";
new const String:bronie[] = "#weapon_mp5sd#weapon_glock";
new const inteligencja = 0;
new const zdrowie = 30;
new const obrazenia = 0;
new const wytrzymalosc = 10;
new const kondycja = 20;new bool:ma_klase[65],
ilosc_rakiet_gracza[65];new sprite_explosion;
public Plugin:myinfo =
{
name = "x",
author = "x",
description = "x,
version = "x",
url = "x"
};
public OnPluginStart()
{
cod_register_class(nazwa, opis, bronie, inteligencja, zdrowie, obrazenia, wytrzymalosc, kondycja);
HookEvent("player_spawn", OdrodzenieGracza);
}
public OnMapStart()
{
PrecacheModel("models/props/de_vertigo/construction_safetyribbon_01.mdl");
sprite_explosion = PrecacheModel("materials/sprites/blueflare1.vmt");
PrecacheSound("weapons/hegrenade/explode5.wav");
}
public cod_class_enabled(client)
{
ma_klase[client] = true;
ilosc_rakiet_gracza[client] = 2;
CS_SetClientClanTag(client, "[Wsparcie Ogn.]");
}
public cod_class_disabled(client)
{
ma_klase[client] = false;
CS_SetClientClanTag(client, "[Brak]");
}
public cod_class_skill_used(client)
{
if(!ilosc_rakiet_gracza[client])
PrintToChat(client, "Wykorzystales juz moc swojej klasy w tym zyciu!");
else
{
new ent = CreateEntityByName("hegrenade_projectile");
if(ent != -1)
{
new Float:forigin[3];
GetClientEyePosition(client, forigin);new Float:fangles[3];
GetClientEyeAngles(client, fangles);new Float:iorigin[3], Float:iangles[3], Float:ivector[3];
TR_TraceRayFilter(forigin, fangles, MASK_SOLID, RayType_Infinite, TraceRayFilter, ent);
TR_GetEndPosition(iorigin);
DispatchSpawn(ent);
ActivateEntity(ent);
SetEntityModel(ent, "models/props/de_vertigo/construction_safetyribbon_01.mdl");
SetEntityMoveType(ent, MOVETYPE_STEP);
SetEntityGravity(ent, 0.1);
MakeVectorFromPoints(forigin, iorigin, ivector);
NormalizeVector(ivector, ivector);
ScaleVector(ivector, 1000.0);
GetVectorAngles(ivector, iangles);
TeleportEntity(ent, forigin, iangles, ivector);
SetEntProp(ent, Prop_Send, "m_usSolidFlags", 12);
SetEntProp(ent, Prop_Data, "m_nSolidType", 6);
SetEntProp(ent, Prop_Send, "m_CollisionGroup", 1);
SetEntPropEnt(ent, Prop_Send, "m_hOwnerEntity", client);
SDKHook(ent, SDKHook_StartTouchPost, DotykRakiety);ilosc_rakiet_gracza[client] --;
}
}
}
public Action:DotykRakiety(ent, client)
{
if(!IsValidEntity(ent))
return Plugin_Continue;new attacker = GetEntPropEnt(ent, Prop_Send, "m_hOwnerEntity");
if(!IsValidClient(attacker) || !ma_klase[attacker])
{
AcceptEntityInput(ent, "Kill");
return Plugin_Continue;
}
if(IsValidClient(client) && GetClientTeam(attacker) == GetClientTeam(client))
return Plugin_Continue;new Float:forigin[3], Float:iorigin[3];
GetEntPropVector(ent, Prop_Send, "m_vecOrigin", forigin);new damage = 50+RoundFloat(cod_get_user_maks_intelligence(attacker)*0.5);
for(new i = 1; i <= MaxClients; i++)
{
if(!IsClientInGame(i) || !IsPlayerAlive(i))
continue;if(GetClientTeam(attacker) == GetClientTeam(i))
continue;GetClientEyePosition(i, iorigin);
if(GetVectorDistance(forigin, iorigin) <= 100.0)
{
if(cod_get_user_class(i) == cod_get_classid("Obronca"))
continue;cod_inflict_damage(i, attacker, damage);
}
}EmitSoundToAll("weapons/hegrenade/explode5.wav", ent, SNDCHAN_AUTO, SNDLEVEL_GUNFIRE);
TE_SetupExplosion(forigin, sprite_explosion, 10.0, 1, 0, 100, 100);
TE_SendToAll();AcceptEntityInput(ent, "Kill");
return Plugin_Continue;
}
public bool:TraceRayFilter(ent, contents)
{
return false;
}
public Action:OdrodzenieGracza(Handle:event, String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(!IsValidClient(client) || !ma_klase[client])
return Plugin_Continue;ilosc_rakiet_gracza[client] = 2;
return Plugin_Continue;
}Nic tam nie zmienialem
-
Tego nie ruszalem, usunalem tylko cvary na level, exp, maksymalna iteligencje itd Uzycie jest oryginalne, sprawdzalem z silnikiem oryginalnym i tez nie dzialalo. Byc moze robie cos zle :V
Tego nie ruszalem, usunalem tylko cvary na level, exp, maksymalna iteligencje itd Uzycie jest oryginalne, sprawdzalem z silnikiem oryginalnym i tez nie dzialalo. Byc moze robie cos zle :V
-
Tak, mam zbindowane, to jest cod z amxx 1.1 nowy co udostepnil linux, juz cvarow sie pozbylem bo tez mi nie dzialaly
[COD NOWY] Nie da sie uzyc mocy klasy/itemu
w CodMod
Opublikowano
Pomogl mi kto inny na innym forum