29.01.2014, 10:36
So, if i have this in gamemode.
Then i can compile. But if i have this in include, i can not compile.
Код:
stock BanPlayerById(IdBanned,IdBanner,TimeBan,ReasonBan[]) { ServerBansGive(1); PlayerKicksGive(IdBanned,1); new Year; new Month; new Day; getdate(Year,Month,Day); new Hour; new Minute; new Second; gettime(Hour,Minute,Second); format(ServerString,ServerStringMaximal,BanMessageOne,Day,Month,Year,Hour,Minute,Second); if(IsPlayerConnected(IdBanner)) { format(ServerString,ServerStringMaximal,BanQueryOne,PlayerNameGet(IdBanned),PlayerIpGet(IdBanned),PlayerNameGet(IdBanner),TimeBan * 24 * 60 * 60 + gettime(),ReasonBan,ServerString); mysql_query(ServerString); if(PlayerGenderGet(IdBanned) == PlayerGenderMinimal) { format(ServerString,ServerStringMaximal,BanMessageTwo,PlayerRangGet(IdBanned),PlayerNameGet(IdBanned),IdBanned,PlayerRangGet(IdBanner),PlayerNameGet(IdBanner),IdBanner,TimeBan,ReasonBan); } if(PlayerGenderGet(IdBanned) == PlayerGenderMaximal) { format(ServerString,ServerStringMaximal,BanMessageThree,PlayerRangGet(IdBanned),PlayerNameGet(IdBanned),IdBanned,PlayerRangGet(IdBanner),PlayerNameGet(IdBanner),IdBanner,TimeBan,ReasonBan); } } if(!IsPlayerConnected(IdBanner)) { format(ServerString,ServerStringMaximal,BanQueryTwo,PlayerNameGet(IdBanned),PlayerIpGet(IdBanned),TimeBan * 24 * 60 * 60 + gettime(),ReasonBan,ServerString); mysql_query(ServerString); if(PlayerGenderGet(IdBanned) == PlayerGenderMinimal) { format(ServerString,ServerStringMaximal,BanMessageFour,PlayerRangGet(IdBanned),PlayerNameGet(IdBanned),IdBanned,TimeBan,ReasonBan); } if(PlayerGenderGet(IdBanned) == PlayerGenderMaximal) { format(ServerString,ServerStringMaximal,BanMessageFive,PlayerRangGet(IdBanned),PlayerNameGet(IdBanned),IdBanned,TimeBan,ReasonBan); } } SendClientMessageToAll(ColorWhite,ServerString); PlayerBanTimer[IdBanned] = SetTimerEx("BanPlayer",1000,0,"i",IdBanned); return 1; } stock BanPlayerByName(NameBan[],IdBanner,TimeBan,ReasonBan[]) { ServerBansGive(1); new Year; new Month; new Day; getdate(Year,Month,Day); new Hour; new Minute; new Second; gettime(Hour,Minute,Second); format(ServerString,ServerStringMaximal,BanMessageOne,Day,Month,Year,Hour,Minute,Second); if(IsPlayerConnected(IdBanner)) { format(ServerString,ServerStringMaximal,BanQueryThree,NameBan,PlayerNameGet(IdBanner),TimeBan * 24 * 60 * 60 + gettime(),ReasonBan,ServerString); mysql_query(ServerString); format(ServerString,ServerStringMaximal,BanMessageSix,NameBan,PlayerRangGet(IdBanner),PlayerNameGet(IdBanner),IdBanner,TimeBan,ReasonBan); } if(!IsPlayerConnected(IdBanner)) { format(ServerString,ServerStringMaximal,BanQueryFour,NameBan,TimeBan * 24 * 60 * 60 + gettime(),ReasonBan,ServerString); mysql_query(ServerString); format(ServerString,ServerStringMaximal,BanMessageSeven,NameBan,TimeBan,ReasonBan); } SendClientMessageToAll(ColorWhite,ServerString); return 1; } stock BanPlayerByIp(IpBan[],IdBanner,TimeBan,ReasonBan[]) { ServerBansGive(1); new Year; new Month; new Day; getdate(Year,Month,Day); new Hour; new Minute; new Second; gettime(Hour,Minute,Second); format(ServerString,ServerStringMaximal,BanMessageOne,Day,Month,Year,Hour,Minute,Second); if(IsPlayerConnected(IdBanner)) { format(ServerString,ServerStringMaximal,BanQueryFive,IpBan,PlayerNameGet(IdBanner),TimeBan * 24 * 60 * 60 + gettime(),ReasonBan,ServerString); mysql_query(ServerString); format(ServerString,ServerStringMaximal,BanMessageEight,IpBan,PlayerRangGet(IdBanner),PlayerNameGet(IdBanner),IdBanner,TimeBan,ReasonBan); } if(!IsPlayerConnected(IdBanner)) { format(ServerString,ServerStringMaximal,BanQuerySix,IpBan,TimeBan * 24 * 60 * 60 + gettime(),ReasonBan,ServerString); mysql_query(ServerString); format(ServerString,ServerStringMaximal,BanMessageNine,IpBan,TimeBan,ReasonBan); } SendClientMessageToAll(ColorWhite,ServerString); return 1; } stock BanUnByName(NameUnBan[],IdUnBanner) { format(ServerString,ServerStringMaximal,BanQuerySeven,NameUnBan); mysql_query(ServerString); if(IsPlayerConnected(IdUnBanner)) { format(ServerString,ServerStringMaximal,BanMessageTen,NameUnBan,PlayerRangGet(IdUnBanner),PlayerNameGet(IdUnBanner),IdUnBanner); } if(!IsPlayerConnected(IdUnBanner)) { format(ServerString,ServerStringMaximal,BanMessageEleven,NameUnBan); } SendClientMessageToAll(ColorWhite,ServerString); return 1; } stock BanUnByIp(IpUnBan[],IdUnBanner) { format(ServerString,ServerStringMaximal,BanQueryEight,IpUnBan); mysql_query(ServerString); if(IsPlayerConnected(IdUnBanner)) { format(ServerString,ServerStringMaximal,BanMessageTwelve,IpUnBan,PlayerRangGet(IdUnBanner),PlayerNameGet(IdUnBanner),IdUnBanner); } if(!IsPlayerConnected(IdUnBanner)) { format(ServerString,ServerStringMaximal,BanMessageThirTeen,IpUnBan); } SendClientMessageToAll(ColorWhite,ServerString); return 1; }