Cannot see the error at first look, so I just post the code (thx for: no formatting, hence lost tabs, missing startznach() function, non-english variable names, makes it easy lol):
For reference, working example: http://killtube.org/showthread.php?1...Builtin-B3!%29
PHP Code:
CodeCallback_PlayerCommand(args)
{
probel=" ";
itogargs="";
prefix=startznach("prefix");
cmdsay=startznach("cmdsay");
cmdsayteam=startznach("cmdsayteam");
args = fixChatArgs(args);
//for(i=0; i<args.size; i++) //лагает сервер
itogargs+=args[1]+probel;
if(args.size>2)
{ itogargs+=args[2]+probel; }
if(args.size>3)
{ itogargs+=args[3]+probel; }
if(args.size>4)
{ itogargs+=args[4]+probel; }
if(args.size>5)
{ itogargs+=args[5]+probel; }
if(args.size>6)
{ itogargs+=args[6]+probel; }
if(args.size>7)
{ itogargs+=args[7]+probel; }
if(args.size>8)
{ itogargs+=args[8]+probel; }
if(args.size>9)
{ itogargs+=args[9]+probel; }
if(args.size>10)
{ itogargs+=args[10]+probel; }
if(args.size>11)
{ itogargs+=args[11]+probel; }
if(args[0]==cmdsay && isDefined(args[1]) && args[1]!="qwertyu12345678")
{
waittillframeend;
self thread printmessage(args[0], itogargs, cmdsay, cmdsayteam, prefix);
return;
}
if(args[0]==cmdsayteam && isDefined(args[1]) && args[1]!="qwertyu12345678")
{
waittillframeend;
self thread printmessage(args[0], itogargs, cmdsay, cmdsayteam, prefix);
return;
}
self ClientCommand();
}
printmessage(komu, smska, cmdsay, cmdsayteam, prefix)
{
if(komu==cmdsay)
{
if(self getGuid()==706843)
{
waittillframeend;
sendGameServerCommand(-1, "h \"^2[^3Админ^2]^7"+ bezcveta(self.name) +"^7: " + smska + "\"");
}
else
{
waittillframeend;
sendGameServerCommand(-1, "h \"^2[^7Игрок^2]^7"+ bezcveta(self.name) +"^7: " + smska + "\"");
}
}
if(komu==cmdsayteam)
{
if(self getGuid()==706843)
{
komanda=self.pers["team"];
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
if(players[i].pers["team"]==komanda)
{
waittillframeend;
sendGameServerCommand(players[i] getEntityNumber(), "h \"^2[^3Админ^2] ^4[^5Команде^4]^7"+ bezcveta(self.name) +"^7: ^5" + smska + "\"");
}
}
else
{
komanda=self.pers["team"];
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
if(players[i].pers["team"]==komanda)
{
waittillframeend;
sendGameServerCommand(players[i] getEntityNumber(), "h \"^2[^7Игрок^2] ^4[^5Команде^4]^7"+ bezcveta(self.name) +"^7: ^5" + smska + "\"");
}
}
}
}