/* Plugin Template generated by Pawn Studio */ #include <sourcemod> #include <sdktools> #include <sdkhooks> public Plugin:myinfo = { name = "Premium rpg", author = "Knopers", description = "Plugin dla johna", version = "1.0", url = "heavycraft.pl" } public OnPluginStart() { PrintToServer("[KNOPERS]Plugin gotowy do pracy"); HookEvent("round_start", RoundStart, EventHookMode_Post) } public Action:RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); CreateTimer(1.00, GivePoint, _, TIMER_REPEAT); } public Action:GivePoint(Handle:timer, any:client) { new frag = GetClientFrags(client); if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) >= 1) && frag != 0 ) { GivePlayerItem(client, "weapon_hegrenade"); } else { PrintToServer(""); } }
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.
|
Guest Message by DevFuse
knopers666
Rejestracja: 18.01.2013Aktualnie: Nieaktywny
Poza forum Ostatnio: 10.07.2013 20:57
Statystyki
- Grupa: Użytkownik
- Całość postów: 23
- Odwiedzin: 1,579
- Tytuł: Życzliwy
- Wiek: Wiek nie został ustalony
- Urodziny: Data urodzin nie została podana
-
Płeć
Mężczyzna
-
Lokalizacja
Polska
Kontakt
Moje posty
W temacie: Hookowanie śmierci
03.03.2013 20:21
Dobra znalazłem rozwiązanie tylko coś nie chce działać
W temacie: [ROZWIĄZANE] czemu nie blokuje granatów ?
26.01.2013 20:43
Poradziłem sobie w inny sposób.Temat do zamknięcia.
/* Plugin Template generated by Pawn Studio */ #include <sourcemod> #include <smlib> #include <colors> #define PLUGIN_VERSION "v1.0" #define CS_TEAM_NONE 0 /**< No team yet. */ #define CS_TEAM_SPECTATOR 1 /**< Spectators. */ #define CS_TEAM_T 2 /**< Terrorists. */ #define CS_TEAM_CT 3 /**< Counter-Terrorists. */ public Plugin:myinfo = { name = "ZmAmmo", author = "Knopers", description = "Plugin dla snickersa", version = "PLUGIN_VERSION", url = "http://heavycraft.pl/" } public OnPluginStart() { CreateConVar("zm_ammo", PLUGIN_VERSION, "version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); PrintToServer("[Ammo]Plugin jest gotowy do pracy !"); RegConsoleCmd("sm_ammo", sm_ammo); } public Action:sm_ammo(client, args) { new slot1 = 0 new weapon1 = Client_GetWeaponBySlot(client, slot1) if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) == 3) && weapon1 != -1 ) { new primaryAmmo = 999 new secondaryAmmo = 999 Client_SetWeaponPlayerAmmoEx(client, weapon1, primaryAmmo, secondaryAmmo); CPrintToChat(client, "{red}[KIT] {default}Amunicja dodana."); }else { PrintToServer("[KIT] Nie przemuj sie tym napisem"); } new slot2 = 1 new weapon2 = Client_GetWeaponBySlot(client, slot2) if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) == 3) && weapon2 != -1 ) { new primaryAmmo = 999 new secondaryAmmo = 999 Client_SetWeaponPlayerAmmoEx(client, weapon2, primaryAmmo, secondaryAmmo); } else { PrintToServer("[KIT} Nie przemuj sie tym napisem"); } }
W temacie: [ROZWIĄZANE] czemu nie blokuje granatów ?
25.01.2013 19:19
No, ale sourcemod sam wykrywa to jako !ammo przetestuj sobie(lub /ammo).
W temacie: [ROZWIĄZANE] czemu nie blokuje granatów ?
25.01.2013 18:31
Dałem zły kod przepraszam ale to zmniejsza z 2 błędów do jednego(z tym "_:").Błąd oczywiście znajduje się w tej samej linijce.
EDIT: Może ktoś zna inną metodę jak zablokować komendę !ammo dla granatów ?
EDIT: Może ktoś zna inną metodę jak zablokować komendę !ammo dla granatów ?
W temacie: [ROZWIĄZANE] czemu nie blokuje granatów ?
25.01.2013 14:51
@UP Działa tylko musiałem zmienić kod i znowu ten problem.Dobrze by było gdybyś napisał z czym to jest związane.
/* Plugin Template generated by Pawn Studio */ #include <sourcemod> #include <smlib> #include <colors> #include <css_weapons> #define PLUGIN_VERSION "v1.0" #define CS_TEAM_NONE 0 /**< No team yet. */ #define CS_TEAM_SPECTATOR 1 /**< Spectators. */ #define CS_TEAM_T 2 /**< Terrorists. */ #define CS_TEAM_CT 3 /**< Counter-Terrorists. */ public Plugin:myinfo = { name = "ZmAmmo", author = "Knopers", description = "Plugin dla snickersa", version = "PLUGIN_VERSION", url = "http://heavycraft.pl/" } public OnPluginStart() { CreateConVar("zm_ammo", PLUGIN_VERSION, "version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); PrintToServer("[Ammo]Plugin jest gotowy do pracy !"); RegConsoleCmd("sm_ammo", sm_ammo); } public Action:sm_ammo(client, args) { new weapon = Client_GetActiveWeapon(client); new slot = GetSlotFromWeaponID(weapon); if ( (IsClientInGame(client)) && (IsPlayerAlive(client) && GetClientTeam(client) == 3) && slot == _:SlotGrenade ) { new primaryAmmo = 999 new secondaryAmmo = 999 Client_SetWeaponPlayerAmmoEx(client, weapon, primaryAmmo, secondaryAmmo); CPrintToChat(client, "{red}[KIT] {default}Amunicja dodana..."); }else{ CPrintToChat(client, "{red}[KIT] {default}Nie dla zombie amunicja :)"); } }
- AMXX.pl: Support AMX Mod X i SourceMod
- → Przeglądanie profilu: Posty: knopers666
- Regulamin