Cześć mam problem, nie umiem skonpilować tego VIP, byłby ktoś w stanie sprawdzić co jest w nim nie tak i go poprawić.
Z góry dzięki ![]()
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.
|
Kompilacja i poprawa
#1
Napisano 30.12.2015 16:54
#3
Napisano 02.01.2016 19:26
mógłbyś podesłać jeszcze *.sp ?
#4
Napisano 02.01.2016 19:39
.sp jest to które podałeś u góry. Brakowało Ci pewnie bibliotek, dlatego plugin się nie skompilował ![]()
Użytkownik Green_Arrow edytował ten post 02.01.2016 19:44
#5
Napisano 03.01.2016 21:23
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <clientprefs>
#include <colors>
#include <loghelper>
public Plugin:myinfo =
{
name = "VIP Plugin",
description = "vip plugin",
version = "1.0.56",
};
public OnPluginStart()
{
RegConsoleCmd("say", Command_SendToAll);
RegConsoleCmd("say_team", Command_SendToTeam);
HookEvent("player_spawn", Event_OnPlayerSpawn);
HookEvent("bomb_planted", Event_BombPlanted);
HookEvent("bomb_defused", Event_BombDefused);
HookEvent("player_death", Event_PlayerDeath);
HookEvent("player_team", Event_TagTable);
HookEvent("player_spawn", Event_TagTable);
}
public Event_OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new money = GetEntProp(client, Prop_Send, "m_iAccount");
if (client > 0 && IsPlayerAlive(client))
{
if (IsPlayerGenericAdmin(client))
{
SetEntProp(client, Prop_Send, "m_ArmorValue", 100, 1); //armor
GivePlayerItem(client, "weapon_smokegrenade"); //smoke
GivePlayerItem(client, "weapon_flashbang"); //flash
GivePlayerItem(client, "weapon_hegrenade"); //grenade
GivePlayerItem(client,"weapon_molotov"); //molotov
}
}
}
public Event_BombPlanted(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new money = GetEntProp(client, Prop_Send, "m_iAccount");
if (IsPlayerGenericAdmin(client))
{
SetEntProp(client, Prop_Send, "m_iAccount", money + 200); //200$ plus
}
}
public Event_BombDefused(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new money = GetEntProp(client, Prop_Send, "m_iAccount");
if (IsPlayerGenericAdmin(client))
{
SetEntProp(client, Prop_Send, "m_iAccount", money + 200); //200$ plus
}
}
public Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new money = GetEntProp(attacker, Prop_Send, "m_iAccount");
new bool:headshot = GetEventBool(event, "headshot");
if (IsPlayerGenericAdmin(attacker))
{
if(headshot){
SetEntProp(attacker, Prop_Send, "m_iAccount", money + 200); //200$ plus for hs
}else{
SetEntProp(attacker, Prop_Send, "m_iAccount", money + 100); //100$ plus for kill
}
}
}
public Action:Command_SendToAll(client, args)
{
if (IsPlayerGenericAdmin(client))
{
decl String:sTextToAll[1024];
GetCmdArgString(sTextToAll, sizeof(sTextToAll));
StripQuotes(sTextToAll);
LogPlayerEvent(client, "say=", sTextToAll);
new team = GetClientTeam(client);
if(IsPlayerAlive(client) && team == 2 || team == 3)
{
PrintToChatAll("\x01\x05 %N \x01%s", client, sTextToAll);
}
/* Player isn't alive and have team (no spec) */
else if(!IsPlayerAlive(client) && team == 2 || team == 3)
{
PrintToChatAll("\x01*NIE ŻYJE* ]\x05 %N \x01%s", client, sTextToAll);
}
/* Player is in spectate */
else if(!IsPlayerAlive(client) && team != 2 && team != 3)
{
PrintToChatAll("\x01*OBSERWATOR* \x05 %N \x01%s", client, sTextToAll);
}
return Plugin_Handled;
}
return Plugin_Continue;
}
public Action:Command_SendToTeam(client, args)
{
if (IsPlayerGenericAdmin(client))
{
decl String:sTextToAll[1024];
GetCmdArgString(sTextToAll, sizeof(sTextToAll));
StripQuotes(sTextToAll);
LogPlayerEvent(client, "say=", sTextToAll);
new team = GetClientTeam(client);
if(IsPlayerAlive(client) && team == 2 || team == 3)
{
for(new i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i))
{
new PlayersTeam = GetClientTeam(i);
if(PlayersTeam & team)
{
if(team == 2)
PrintToChat(i, "\x01(Terrorysta) \x05 %N \x01%s", client, sTextToAll);
else
PrintToChat(i, "\x01(Antyterrorysta) \x05 %N \x01%s", client, sTextToAll);
}
}
}
}
/* Player isn't alive and have team (no spec) */
else if(!IsPlayerAlive(client) && team == 2 || team == 3)
{
for(new i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i) && !IsPlayerAlive(i))
{
new PlayersTeam = GetClientTeam(i);
if(PlayersTeam & team)
{
if(team == 2)
PrintToChat(i, "\x01*NIE ŻYJE*(Terrorysta) \x05 %N \x01%s", client, sTextToAll);
else
PrintToChat(i, "\x01*NIE ŻYJE*(Antyterrorysta) \x05 %N \x01%s", client, sTextToAll);
}
}
}
}
/* Player is in spectate */
else if(!IsPlayerAlive(client) && team != 2 && team != 3)
{
for(new i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i) && !IsPlayerAlive(i))
{
new PlayersTeam = GetClientTeam(i);
if(PlayersTeam & team)
{
if(team == 2)
PrintToChat(i, "\x01*OBSERWATOR*(Terrorysta) \x05 %N \x01%s", client, sTextToAll);
else
PrintToChat(i, "\x01*OBSERWATOR*(Antyterrorysta) \x05 %N \x01%s", client, sTextToAll);
}
}
}
}
return Plugin_Handled;
}
return Plugin_Continue;
}
/*
@param client id
return bool
*/
bool:IsPlayerGenericAdmin(client)
{
if (CheckCommandAccess(client, "generic_admin", ADMFLAG_RESERVATION, false))
{
return true;
}
return false;
}
Dalbys rade mi to skompilowac ? Kompilator z amxx nie lapie bibliotek ;c
#6
Napisano 03.01.2016 21:50
Nie mam prawa do edycji, dodatkowo nie dzialaja kolory na czacie ;c
#7
Napisano 03.01.2016 22:13
łap
Załączone pliki
#9
Napisano 05.01.2016 14:45
Do czatu użyj
#include <scp>
public Action:OnChatMessage(&author, Handle:recipients, String:name[], String:message[])
{
if(IsClientInGame(author) && IsPlayerGenericAdmin(author))
{
Format(name, MAXLENGTH_NAME, "%s", name);
new MaxMessageLength = MAXLENGTH_MESSAGE - strlen(name) - 5;
Format(name, MaxMessageLength, " [VIP]%s",name);
return Plugin_Changed;
}
return Plugin_Continue;
}
Sprzedam paczkę CodMod!
Plugin !free na DeathRun
C4Sound - muzyka przed wybuchem bomby
OnlyHS - głosowanie na OnlyHS w pierwszej rundzie
#10
Napisano 05.01.2016 16:45
Zawsze jak próbuje skompilować plugin ;c
http://screenshot.sh/n8c3bKLlDYkLC
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych


Dodatki SourceMod















