You are not logged in.

[CS:S] Code fehler?

Dear visitor, welcome to sourceserver.info. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, November 12th 2014, 4:21pm

Code fehler?

Hallo liebe Community,

Ich habe ein kleines Problem.


Spoiler Spoiler


public OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
for(new i; i <= MaxClients; i++)
{
if(IsClientValid(i) && GetClientTeam(i) == CS_TEAM_T)
{
ShowPanel(i);
}
}
}


Error den ich bekomme: test.sp<26> : error 017: undefined symbol "IsClientValid"


Bitte um schnelle Hilfe.


Mfg

Greetz
Rechtschreibfehler sind voll normal

2

Sunday, November 16th 2014, 10:27am

#push

Greetz
Rechtschreibfehler sind voll normal

Jackmaster

Super Moderator

Posts: 660

wcf.user.option.userOption53: Ja

  • Send private message

3

Sunday, November 16th 2014, 11:08am

Die Funktion "IsClientValid" existiert in SM sowie in deinem Code nicht.
Die grundlegende Funktion ist, dass client > 0 & client ingame.


gruß

4

Sunday, November 16th 2014, 12:52pm

Kann mir des bitte jemand richtig fixen?

Spoiler Spoiler



public OnPluginStart()
{
HookEvent("round_start", OnRoundStart);
}

public OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
for(new i; i <= MaxClients; i++)
{
if(IsClientValid(i) && GetClientTeam(i) == CS_TEAM_T)
{
ShowPanel(i);
}
}
}

Greetz
Rechtschreibfehler sind voll normal

Bara

Professional

Posts: 834

wcf.user.option.userOption53: Ja

  • Send private message

5

Sunday, November 16th 2014, 1:37pm

Spoiler Spoiler

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <sourcemod>
#include <cstrike>

public OnPluginStart()
{
	HookEvent("round_start", OnRoundStart);
}

public OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
	for(new i; i <= MaxClients; i++)
	{
		if(IsClientValid(i) && GetClientTeam(i) == CS_TEAM_T)
		{
			// ShowPanel(i);
		}
	}
}

stock bool:IsClientValid(client)
{
	if (client > 0 && client <= MaxClients)
	{
		if (IsClientInGame(client))
		{
			return true;
		}
		return false;
	}
	return false;
}