Thread: SM ForceCamera
View Single Post
rsg
Member
Join Date: Apr 2011
Old 07-12-2011 , 07:44   Re: SM ForceCamera
Reply With Quote #10

error log:
Quote:
L 07/10/2011 - 00:285: [SM] Native "IsClientConnected" reported: Client index 0 is invalid
L 07/10/2011 - 00:285: [SM] Displaying call stack trace for plugin "smforcecam.smx":
L 07/10/2011 - 00:285: [SM] [0] Line 361, C:\Users\Serhiy\Desktop\scripting\smforcecam. sp::NextPrevClient()
L 07/10/2011 - 00:285: [SM] [1] Line 275, C:\Users\Serhiy\Desktop\scripting\smforcecam. sp::Cmd_spec_prev()
anybody fix this plugin

problem in plugin:
Quote:
NextPrevClient(client, bool:Next = true,Team = -1, bool:Alive = true)
{
if(client <=0 ) client = 1 ;
if(client > MaxClients ) client = MaxClients ;
new i = client;

if(Next) i++;
else i--;

for(; ; )
{
if(IsClientConnected(i) && IsClientInGame(i) )
{
if(!Alive || ( Alive && IsPlayerAlive(i)) )
{
if(Team == -1)
{
break;
}
new Team2 = GetClientTeam(i);
if(Team == Team2)
{
break;
}
}
}

if(i == MaxClients && Next) i = 0;
if(i == 1 && !Next) i = MaxClients;

if(i == client) return -1; // No clients
if(Next) i++;
else i--;
}
return i;
}
rsg is offline
Send a message via Skype™ to rsg