It is currently 16 Dec 2018 06:06





Reply to topic  [ 2 posts ] 
 [Cerere Plugin] Tags Error 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 14 May 2017 22:26
Posts: 3
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Salut! Am si eu o problema cu acest plugin!
- Imi da eroare cand incerc sa compilez!

Sursă
| Afiseaza codul
#include <sourcemod>
#include <cstrike>
#include <sdktools>

#define LoopClients(%1) for(int %1 = 1; %1 <= MaxClients; %1++) if(IsClientInGame(%1))

public Plugin:myinfo =
{
name = "[Scoreboard] Tags-Fix",
description = "Scoreboard tags-fix",
author = ".P4NDAzz",
version = "0.2",
url = ""
};

public void OnPluginStart()
{
HookEvent("player_team", EventDeath, EventHookMode:1);
HookEvent("player_spawn", EventSpawn, EventHookMode:1);
HookEvent("round_start", RoundStart, EventHookMode:1);
return 0;
}

public void OnClientPutInServer(client)
{
LoopClients(client)
{
if(client > 0)
{
HandleTag(client);
}
}
}

public Action RoundStart(Event event, const char[] name, bool dontBroadcast)
{
LoopClients(client)
{
if(client > 0)
{
HandleTag(client);
}
}
}

public Action EventSpawn(Event event, const char[] name, bool dontBroadcast)
{
LoopClients(client)
{
if(client > 0)
{
HandleTag(client);
}
}
}

public Action EventDeath(Event event, const char[] name, bool dontBroadcast)
{
LoopClients(client)
{
if(client > 0)
{
HandleTag(client);
}
}
}

void HandleTag(client)
{
if (CheckCommandAccess(client, "fondator", ADMFLAG_ROOT))
{
CS_SetClientClanTag(client, "[Fondator]");
}
else if (CheckCommandAccess(client, "Owner", ADMFLAG_CUSTOM1))
{
CS_SetClientClanTag(client, "[Owner]");
}
else if (CheckCommandAccess(client, "admin", ADMFLAG_GENERIC))
{
CS_SetClientClanTag(client, "[Admin]");
}
else if (CheckCommandAccess(client, "helper", ADMFLAG_CUSTOM5))
{
CS_SetClientClanTag(client, "[Helper]");
}
else if (CheckCommandAccess(client, "vip", ADMFLAG_CUSTOM6))
{
CS_SetClientClanTag(client, "[VIP]");
}
}


Eroare
| Afiseaza codul
tags.sp(21) : error 088: cannot return a value from a void function
tags.sp(21) : warning 213: tag mismatch
tags.sp(26) : warning 219: local variable "client" shadows a variable at a preceding level


Vă multumesc de răspunsuri!


02 Dec 2018 16:34
Profile multumesc WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 10 Oct 2014 05:21
Posts: 3495
Location: Roman, Neamț
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Membru Club eXtreamCS (6 luni)
Scripter eXtreamCS
Fond eXtream: 0
| Afiseaza codul
#include <sourcemod>
#include <cstrike>
#include <sdktools>

#define LoopClients(%1) for(int %1 = 1; %1 <= MaxClients; %1++) if(IsClientInGame(%1))

public Plugin:myinfo =
{
name = "[Scoreboard] Tags-Fix",
description = "Scoreboard tags-fix",
author = ".P4NDAzz",
version = "0.2",
url = ""
};

public void OnPluginStart()
{
HookEvent("player_team", EventDeath, EventHookMode:1);
HookEvent("player_spawn", EventSpawn, EventHookMode:1);
HookEvent("round_start", RoundStart, EventHookMode:1);
}

public void OnClientPutInServer(client)
{
if(client > 0)
{
HandleTag(client);
}
}

public Action RoundStart(Event event, const char[] name, bool dontBroadcast)
{
LoopClients(client)
{
if(client > 0)
{
HandleTag(client);
}
}
}

public Action EventSpawn(Event event, const char[] name, bool dontBroadcast)
{
LoopClients(client)
{
if(client > 0)
{
HandleTag(client);
}
}
}

public Action EventDeath(Event event, const char[] name, bool dontBroadcast)
{
LoopClients(client)
{
if(client > 0)
{
HandleTag(client);
}
}
}

void HandleTag(client)
{
if (CheckCommandAccess(client, "fondator", ADMFLAG_ROOT))
{
CS_SetClientClanTag(client, "[Fondator]");
}
else if (CheckCommandAccess(client, "Owner", ADMFLAG_CUSTOM1))
{
CS_SetClientClanTag(client, "[Owner]");
}
else if (CheckCommandAccess(client, "admin", ADMFLAG_GENERIC))
{
CS_SetClientClanTag(client, "[Admin]");
}
else if (CheckCommandAccess(client, "helper", ADMFLAG_CUSTOM5))
{
CS_SetClientClanTag(client, "[Helper]");
}
else if (CheckCommandAccess(client, "vip", ADMFLAG_CUSTOM6))
{
CS_SetClientClanTag(client, "[VIP]");
}
}

_________________
METODA BOOST/DROP 2018 GRATUITA (pentru CS 1.6)
AMX XMAS Gifts 2.0 - Private Plugin
AMX Christmass Addons (2019)
[VAND] Addons Zombie v7.1 (Release 10 February 2018)[/center]


02 Dec 2018 21:30
Profile multumesc
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group