Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 22024l49nv7oo dodana przez Skull., 06.07.2015 16:18
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. 32. 33. 34.
public LoadData(id) { new Temp[512], Data[1]; Data[0] = id; new PlayerName[32], PlayerSteamID[32], PlayerIP[32]; get_user_name(id, PlayerName, charsmax(PlayerName)); get_user_authid(id, PlayerSteamID, charsmax(PlayerSteamID)); get_user_ip(id, PlayerIP, charsmax(PlayerIP), 1); format(Temp,charsmax(Temp),"SELECT * FROM `Bany` WHERE (`Bany`.`Banned_Nick` = '%s') OR (`Bany`.`Banned_SteamID` = '%s') OR (`Bany`.`Banned_IP` = '%s');", PlayerName, PlayerSteamID, PlayerIP); SQL_ThreadQuery(SqlTuple, "RegisterClient", Temp, Data, 1); return PLUGIN_HANDLED; } public RegisterClient(FailState, Handle:Query, Error[], Errcode, Data[], DataSize) { if(FailState == TQUERY_CONNECT_FAILED) log_amx("Load - Could not connect to SQL database. [%d] %s", Errcode, Error); else if(FailState == TQUERY_QUERY_FAILED) log_amx("Load Query failed. [%d] %s", Errcode, Error); new id; id = Data[0]; if(SQL_NumResults(Query) > 0) PlayerBanned[id] = true; else { PlayerBanned[id] = false; return PLUGIN_HANDLED; } return PLUGIN_HANDLED; }
Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011