Bioły Opublikowano Listopad 17, 2017 o 16:41 Udostępnij Opublikowano Listopad 17, 2017 o 16:41 (edytowane) Witam. Przerabiam menu vip deathrun, które co rundę się wyświetla i można wybrać speed x2, mniejszą grawitację, +100hp, dobulejump. Mam mianowicie dwa problemy, 1 problem z dobule jumpem, nw jak mogę go dopisać do opcji w menu. 2 problem jest taki, że gdy ktoś uruchomi np. grawitacje na spawnie (wgrany shavit) to nie zadziała, trzeba wyjść poza zone. Proszę o pomoc :) . Kod: #include <sourcemod> #include <cstrike> #include <sdktools> #include <sdkhooks> #pragma tabsize 0 #define VERSION "1.0" #define SPEC 1 #define TEAM1 2 #define TEAM2 3 new Handle:g_Health; new Handle:g_Money; new Handle:g_Armor; new bool:g_VipStatus[MAXPLAYERS+1] = {true, ... }; new bool:g_PlayerRespawn[MAXPLAYERS+1] = {false, ... }; new bool:g_VipMenu[MAXPLAYERS + 1] = { true, ... }; public Plugin:myinfo = { name = "VIP Plugin", author = "ITGurra, edit Bioly", description = "Vip Plugin that gives access to gravity and respawn!", version = "2.0", url = "" } public OnPluginStart() { HookEvent("player_spawn", PlayerSpawn); CreateConVar("sm_vip_version", VERSION, "VIP Version", FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); g_Health = CreateConVar("sm_vip_health", "120", "HP On Spawn"); g_Money = CreateConVar("sm_vip_money", "1200", "Money On Spawn"); g_Armor = CreateConVar("sm_vip_armor", "120", "Armor On Spawn"); RegConsoleCmd("sm_myshit", VIP); RegConsoleCmd("sm_myass", VipRespawn, "VIP Respawn"); AutoExecConfig(true, "sm_menuvip"); } public OnClientPostAdminCheck(client) { g_VipStatus[client] = true; g_VipMenu[client] = true; g_PlayerRespawn[client] = true; } public Action:VIP(client, args) { if (IsPlayerGenericAdmin(client) ) { new Handle:VMenu = CreateMenu(VipMenu); SetMenuTitle(VMenu, "[ AdvGaming ]\n.::VIP MENU::."); AddMenuItem(VMenu, "Grawitacja", "Grawitacja"); AddMenuItem(VMenu, "Speed", "Speed x2"); AddMenuItem(VMenu, "+100HP", "+100HP"); AddMenuItem(VMenu, "Jump", "Double Jump"); SetMenuExitButton(VMenu, true); DisplayMenu(VMenu, client, 0); return Plugin_Handled; } else { PrintToChat(client, "\x04[ AdvBot ]\x01 Nie jesteś \x03VIP\x01."); return Plugin_Handled; } } public VipMenu(Handle:VMenu, MenuAction:action, client, position) { if(action == MenuAction_Select) { decl String:item[20]; GetMenuItem(VMenu, position, item, sizeof(item)); if(StrEqual(item, "Grawitacja")) { SetEntityGravity(client, 0.5); return; } else if(StrEqual(item, "Speed")) { SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", 2.0); return; } else if(StrEqual(item, "+100HP")) { SetEntityHealth(client, GetEntProp(client, Prop_Send, "m_iHealth")+100); return; } else if(StrEqual(item, "Jump")) { } } else if(action == MenuAction_End) { CloseHandle(VMenu) } } public Action:VipRespawn(client, args) { if (IsPlayerGenericAdmin(client)) { if (g_PlayerRespawn[client] == true) { CS_RespawnPlayer(client); g_PlayerRespawn[client] = false; } else { PrintToChat(client, "\x04[ AdvBot ]\x01 Nie masz już \x04respawnów\x01 , poczekaj na kolejną mape."); } } } public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if(GetClientTeam(client) > CS_TEAM_SPECTATOR && IsPlayerGenericAdmin(client)) { if((g_VipMenu[client] == true) && (GameRules_GetProp("m_totalRoundsPlayed") > 0)) // show menu on third round ? { g_VipMenu[client] = false; VIP(client, 0); // Use console command callback } SetEntProp(client, Prop_Data, "m_iHealth", GetConVarInt(g_Health)); SetEntProp(client, Prop_Send, "m_iAccount", GetConVarInt(g_Money)); SetEntProp(client, Prop_Send, "m_ArmorValue", GetConVarInt(g_Armor)); } return Plugin_Handled; } bool:IsPlayerGenericAdmin(client) { return CheckCommandAccess(client, "generic_admin", ADMFLAG_RESERVATION, false); } Edytowane Listopad 17, 2017 o 16:47 przez Bioły PluginyCS.pl - Rynek pluginów SourceMod SkillHost.pl - Hosting VPS - z kodem PLUGINYCS -15% Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
GeForce Opublikowano Listopad 17, 2017 o 16:57 Udostępnij Opublikowano Listopad 17, 2017 o 16:57 Zaloguj się lub zarejestruj aby zobaczyć zawartość. Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Bioły Opublikowano Listopad 17, 2017 o 16:59 Autor Udostępnij Opublikowano Listopad 17, 2017 o 16:59 Zaloguj się lub zarejestruj aby zobaczyć zawartość. PluginyCS.pl - Rynek pluginów SourceMod SkillHost.pl - Hosting VPS - z kodem PLUGINYCS -15% Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Bioły Opublikowano Listopad 25, 2017 o 11:22 Autor Udostępnij Opublikowano Listopad 25, 2017 o 11:22 Zaloguj się lub zarejestruj aby zobaczyć zawartość. PluginyCS.pl - Rynek pluginów SourceMod SkillHost.pl - Hosting VPS - z kodem PLUGINYCS -15% Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się