milek Opublikowano Maj 6, 2018 o 07:05 Udostępnij Opublikowano Maj 6, 2018 o 07:05 // C:\Users\PC\Desktop\heheszky\Losowa.sp(25) : error 147: new-style declarations are required // C:\Users\PC\Desktop\heheszky\Losowa.sp(80) : error 017: undefined symbol "Random" #include "include/multi1v1.inc"#include "multi1v1/generic.sp"#include "multi1v1/version.sp"#include <clientprefs>#include <sdktools>#include <sourcemod>#pragma semicolon 1#pragma newdecls requiredbool g_GiveFlash[MAXPLAYERS + 1];Handle g_hFlashCookie = INVALID_HANDLE;public Plugin myinfo = { name = "Losowe Bronie", author = "milek", description = " runda losowa bron", version = "1", url = "hi"};#define MAX_WEAPONS 12int LastWeaponNumber;new const String:all_weapons[MAX_WEAPONS][] = { "weapon_m4a1", "weapon_m4a1_silencer", "weapon_ak47", "weapon_elite", "weapon_famas", "weapon_fiveseven", "weapon_galilar", "weapon_glock", "weapon_hkp2000", "weapon_usp_silencer", "weapon_p250", "weapon_cz75a", };public void OnPluginStart() { LoadTranslations("multi1v1.phrases"); g_hFlashCookie = RegClientCookie("multi1v1_Losowa_Bron", "Multi-1v1 allow Losowa Bron in rounds", CookieAccess_Protected);}public void OnClientConnected(int client) { g_GiveFlash[client] = false;}public void Multi1v1_OnGunsMenuCreated(int client, Menu menu) { char enabledString[32]; GetEnabledString(enabledString, sizeof(enabledString), g_GiveFlash[client], client); AddMenuOption(menu, "Losowe Bronie", "Losowe Bronie: %s", enabledString);}public void Multi1v1_GunsMenuCallback(Menu menu, MenuAction action, int param1, int param2) { if (action == MenuAction_Select) { int client = param1; char buffer[128]; menu.GetItem(param2, buffer, sizeof(buffer)); if (StrEqual(buffer, "Losowe Bronie")) { g_GiveFlash[client] = !g_GiveFlash[client]; SetCookieBool(client, g_hFlashCookie, g_GiveFlash[client]); Multi1v1_GiveWeaponsMenu(client, GetMenuSelectionPosition()); } }}public void Multi1v1_AfterPlayerSetup(int client){ if (!IsActivePlayer(client)) { return; } { new Random; Random = GetRandomInt(0, 33); if (LastWeaponNumber != Random) int arena = Multi1v1_GetArenaNumber(client); int p1 = Multi1v1_GetArenaPlayer1(arena); int p2 = Multi1v1_GetArenaPlayer2(arena); if (p1 >= 0 && p2 >= 0 && g_GiveFlash[p1] && g_GiveFlash[p2]) { GivePlayerItem(client, all_weapons[Random]); } }}public void OnClientCookiesCached(int client) { if (IsFakeClient(client)) return; g_GiveFlash[client] = GetCookieBool(client, g_hFlashCookie);} Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
mastah7991 Opublikowano Maj 6, 2018 o 07:11 Udostępnij Opublikowano Maj 6, 2018 o 07:11 Zaloguj się lub zarejestruj aby zobaczyć zawartość. kontakt steam - mastah7991 ( Steam Community :: mastah7991 ) Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
milek Opublikowano Maj 6, 2018 o 07:47 Autor Udostępnij Opublikowano Maj 6, 2018 o 07:47 Zaloguj się lub zarejestruj aby zobaczyć zawartość. Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi