Multi rcon command
#1

Hi ,
I need make mutli rcon command, over PHP (kick 0; kick 1; kick 2; kick 3; hostname Server hostname edited; password pasword_changed) // MAKE THIS COMMANDS IN ONE MOMENT

I am making reservation system..

This is part of script:
Код:
if(udaj("1", Date('dmY'), Date('H'), "gta1", "dostupnost") == 0) {
$cmd="password free";
} else {
$cmd="password ".udaj("1", Date('dmY'), Date('H'), "gta1", "heslo")."";
}
if(udaj("1", Date('dmY'), Date('H'), "gta1", "ip") != udaj("1", Date('dmY'), Date('H')+1, "gta1", "ip")) {
$cmd.="kick 0";
$cmd.="kick 1";
$cmd.="kick 2";
$cmd.="kick 3";
echo "Danemu uzivateli skoncila rezervace";
}
$cmdlen = strlen($cmd);
$passlen = strlen($pass);
$packet = 'SAMP';
$packet .= chr(strtok($ip, '.')).chr(strtok('.')).chr(strtok('.')).chr(strtok('.'));
$packet .= chr($port & 0xFF).chr($port >> 8 & 0xFF);
$packet .= "x";
$packet .= chr($passlen & 0xFF).chr($passlen >> 8 & 0xFF).$pass;
$packet .= chr($cmdlen & 0xFF).chr($cmdlen >> 8 & 0xFF).$cmd;
$fp =fsockopen('udp://' . $ip, $port, $errno, $errstr);
fwrite($fp, $packet);
if ($fp) echo 'Script proveden. Provedl se přнkaz: '.$cmd.''; else echo 'Něco je љpatně';
fclose($fp);
// NOW $CMD return : password freekick 0kick 1kick 2kick 3
Reply
#2

" kick @all " is working ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)