http("http://www.demourl.nl/lfs_plugin.php?u=". GetCurrentPlayerVar("UserName") );
This doesn't seem to work
Is it possible to use a variable in an url?
http("http://www.demourl.nl/lfs_plugin.php?u=". GetCurrentPlayerVar("UserName") );
http("http://www.demourl.nl/lfs_plugin.php" );
$allowed = 1;
$userName = "gai-luron";
doMyCode( $userName,$allowed );
doMyCode( "gai-luron",1 );
SUB doMyCode( $userName,$allowed )
... Do what you want if lpr file
IF( $allowed == 0 ) THEN
cmdlfs( "/kick " . $userName );
ELSE
privMsg("Allowed");
ENDIF
ENDSUB
privMsg("Allowed");
cmdlfs( "/kick gai-luron");
# check minimum amount of laps
$laps_username = GetCurrentPlayerVar("UserName");
http("http://demourl.nl/lfs_plugin.php?u=". $laps_username );
<?php
$username = $_GET['u'];
$req = '';
$check_XRG = '';
$check_XFG = '';
$fp = fopen ("http://www.lfsworld.net/pubstat/get_stat2.php?version=1.4&idk=use_your_own_here_please&action=pb&racer=".$username."&s=1", "r");
while (!feof($fp))
{
$req .= fread($fp, 500);
}
fclose($fp);
$lfs_php_array = json_decode($req);
if (sizeof($lfs_php_array) == 0) {
echo "error";
die();
}
for ($i = 1; $i <= sizeof($lfs_php_array); $i++) {
$n = $i - 1;
if ($lfs_php_array[$n]->track == "000" && $lfs_php_array[$n]->car == "XRG") {
if ($lfs_php_array[$n]->lapcount > 40) {
$check_XRG = 1;
}
else {
$check_XRG = 0;
}
}
if ($lfs_php_array[$n]->track == "000" && $lfs_php_array[$n]->car == "XFG") {
if ($lfs_php_array[$n]->lapcount > 40) {
$check_XFG = 1;
}
else {
$check_XFG = 0;
}
}
}
if ($check_XFG == 1 OR $check_XRG == 1)
{
// echo 'globalMsg("true");';
}
else
{
echo 'privMsg("^3Woops you are a newbie! Please come back in 3 days, bye!");';
echo 'GlobalMsg("'.$username.' is unexperienced (<40 laps /car) and gets a 3 day ban");';
echo 'cmdLFS("/ban '.$username.' 3" );';
// echo 'GlobalMsg("'.$username.' - XFG: '.$check_XFG.' XRG: '.$check_XRG.'");';
}
?>