Problem z kompilatorem
Chucky
16.01.2018
Witam, jestem nowy w source mod ale cóż każdy kiedyś zaczynał.. a mianowicie próbuje prze kompilować vipa załączonego poniżej ale no nie chce się dać wyskakuje cały czas błąd ktoś pomoże?
błąd:
Wystąpił nieznany błąd (126)
Załączone pliki
Chucky
16.01.2018
proszę o edycje ponieważ nie mogę, ale kompilując nawet bez tagów występuje ten sam błąd wiec nie wiem czy ja coś źle robię czy kompilator ma problem.
na stronie sourcemod pokazuje mi to
/groups/sourcemod/upload_tmp/textr7Hjfw.sp(113) : error 029: invalid expression, assumed zero /groups/sourcemod/upload_tmp/textr7Hjfw.sp(114) : error 029: invalid expression, assumed zero
Użytkownik Chucky edytował ten post 16.01.2018 18:42
devil11
16.01.2018
Sprawdź
p.s pluginy kompiluj lokalnie, na stronie sourcemod compiler jest w podstawowej wersji
#include <sourcemod> #include <cstrike> #include <sdktools> #include <scp> #pragma semicolon 1 #pragma newdecls required public Plugin myinfo = { name = "[CS:GO] VIP", author = "xBonio & Avgariat & Vasto_Lorde", description = "VIP Generator by cs-plugin.com", version = "1.0", url = "http://cs-plugin.com" }; Handle WelcomeHUD; char tag[64] = "[VIP]"; int offsetHe; int offsetFlash; int offsetSmoke; int offsetInc; int offsetMol; int offsetDecoy; int offsetTa; int offsetHealth; public void OnPluginStart() { HookEvent("bomb_planted", EventBombPlanted); HookEvent("bomb_defused", EventBombDefused); HookEvent("player_spawn", PlayerSpawn); HookEvent("player_death", PlayerDeath); WelcomeHUD = CreateHudSynchronizer(); CreateTimer(300.0, Info, _, TIMER_REPEAT); } public Action Info(Handle timer) { PrintToChatAll("[\x02VIP\x01] VIP by \x04cs-plugin.com\x01"); } public void OnMapStart() { int entindex; entindex = CreateEntityByName("weapon_hegrenade"); DispatchSpawn(entindex); offsetHe = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_flashbang"); DispatchSpawn(entindex); offsetFlash = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_smokegrenade"); DispatchSpawn(entindex); offsetSmoke = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_incgrenade"); DispatchSpawn(entindex); offsetInc = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_molotov"); DispatchSpawn(entindex); offsetMol = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_decoy"); DispatchSpawn(entindex); offsetDecoy = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_tagrenade"); DispatchSpawn(entindex); offsetTa = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_healthshot"); DispatchSpawn(entindex); offsetHealth = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); } public Action PlayerSpawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); if(!IsPlayerVIP(client)) return; SetEntProp(client, Prop_Send, "m_ArmorValue", 100); SetEntProp(client, Prop_Send, "m_bHasHelmet", 1); int money = GetEntProp(client, Prop_Send, "m_iAccount"); SetEntProp(client, Prop_Send, "m_iAccount", money+200); CS_SetClientClanTag(client, tag); if(GetClientTeam(client) == CS_TEAM_CT) if(GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetHe) < 1) GivePlayerItem(client, "weapon_hegrenade"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetFlash) < 1) GivePlayerItem(client, "weapon_flashbang"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetSmoke) < 1) GivePlayerItem(client, "weapon_smokegrenade"); if(GetClientTeam(client) == CS_TEAM_CT) { for(int x = 0; x < 1; x++) // ilosc inc if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetInc) < 1) GivePlayerItem(client, "weapon_incgrenade"); } else if(GetClientTeam(client) == CS_TEAM_T) { for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetMol) < 1) GivePlayerItem(client, "weapon_molotov"); } for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetDecoy) < 1) GivePlayerItem(client, "weapon_decoy"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetTa) < 1) GivePlayerItem(client, "weapon_tagrenade"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetHealth) < 1) GivePlayerItem(client, "weapon_healthshot"); } public Action PlayerDeath(Handle event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "attacker")); if(!IsValidPlayer(attacker) || !IsPlayerVIP(attacker)) return; int money = GetEntProp(attacker, Prop_Send, "m_iAccount"); SetEntProp(attacker, Prop_Send, "m_iAccount", money+100); bool headshot = GetEventBool(event, "headshot", false); if(headshot) { money = GetEntProp(attacker, Prop_Send, "m_iAccount"); SetEntProp(attacker, Prop_Send, "m_iAccount", money+100); } } public Action EventBombPlanted(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int money = GetEntProp(client, Prop_Send, "m_iAccount"); if(IsPlayerVIP(client)) SetEntProp(client, Prop_Send, "m_iAccount", money+100); } public Action EventBombDefused(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int money = GetEntProp(client, Prop_Send, "m_iAccount"); if(IsPlayerVIP(client)) SetEntProp(client, Prop_Send, "m_iAccount", money+100); } public Action OnChatMessage(int &client, Handle recipients, char[] name, char[] message) { if(!IsPlayerVIP(client)) return Plugin_Continue; Format(name, MAXLENGTH_NAME, " \x04%s \x03%s\x01", tag, name); return Plugin_Changed; } public void OnClientPostAdminCheck(int client) { if(IsPlayerVIP(client)) { char text[100]; Format(text, sizeof(text), "%s %N \n", tag, client); Format(text, sizeof(text), "%s ", text); SetHudTextParams(-1.0, 0.125, 7.0, 45, 209, 0, 255, 0, 0.25, 1.5, 0.5); for(int i = 1; i <= MaxClients; i++) if(IsValidPlayer(i)) ShowSyncHudText(i, WelcomeHUD, text); } } stock bool IsValidPlayer(int client) { if(client >= 1 && client <= MaxClients && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client)) return true; return false; } stock bool IsPlayerVIP(int client) { if(GetUserFlagBits(client) & ADMFLAG_CUSTOM6 && !(GetUserFlagBits(client) & ADMFLAG_ROOT)) return true; return false; }
Użytkownik devil11 edytował ten post 16.01.2018 23:04
devil11
18.01.2018
Jak się nie da jak sie da
vip_104.smx 7,57 KB 46 Ilość pobrań
Użytkownik devil11 edytował ten post 18.01.2018 12:18