Prosty system klas
-
Wystawca
- Typ ogłoszenia NA SPRZEDAŻ
- Stan NOWE
- Do końca 5 dni i 21 godzin -
- Ilość 10
Opis
Dzieki temu pluginowi mozesz tworzyc swoje klasy, ktore beda zawieraly unikatowe rzeczy!
Plugin jest baaardzo prosty i nie jest rozbudowany, aczkolwiek jesli bedzie zainteresowanie moge dodac do niego pare rzeczy.
Komendy:
sm_klasy
sm_klasa
Po wpisaniu jednej z tych komend wyswietla sie menu z dostepnymi klasami, ktore tworzy sie przez ponizsze natywy. Ta ktora identyfikator ma na 0 bedzie ustawiana domyslnie. Plugin posiada pare zabezpieczen, ktore beda pokazywac errory jesli klasa zostanie stworzona niepoprawnie np. identyfikator bedzie powtorzony.
Plik inc:
#if defined _bb_classes_included #endinput #endif #define _bb_classes_included forward void Classes_OnPluginLoaded(); native int Classes_AddClass(char[] className, char[] modelPath, int identifier = -1); native int Classes_GetChoosedClass(int client);
Przykladowa klasa:
#include <sourcemod> #include <bb_classes> public void OnPluginStart() { HookEvent("player_spawn", Event_PlayerSpawn); } public void Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); if (IsFakeClient(client)) return; if (Classes_GetChoosedClass(client) == 0) { SetEntityHealth(client, GetClientHealth(client) + 50); PrintToChat(client, "Otrzymales +50hp jako rambo!"); } } public void Classes_OnPluginLoaded() { Classes_AddClass("Rambo", "models/blabla.mdl", 0); }
Zalecane pytania
Brak pytań do wyświetlenia.