Jump to content

Live GameServer Register Script SAMP Problem Need Help..


Mugshot

Recommended Posts

Hello,

 

I currently have a gameserver which runs on SA-MP (San Andreas Multiplayer) and usually in these gameservers you have to register manually inside the gameserver to create an account however theres a PHP script which i downloaded from http://www.dnd.utwente.nl/~jesper/samp/#_SampReg which allows people to register an account from your website which will automaticly create an account in the gameserver. However the script is set for a certain gameserver so ive recoded to match my own gameserver which you are allow to do. But i'm now having problems. The registration form appears but after you input details and click Register the page just loads and shows a empty white page instead of showing the success message.

 

Heres both scripts below:

 

<?php

/**

* An example of how to correspond with the sampreg daemon to make SA:MP registrations.

* This script will work for a godfather registration.

*/

$server = "your.samp.server.hostname.here";

$port = 7776;

 

if (isset($_POST['Register'])) {

if(isset($_POST['Nick']) && isset($_POST['Age']) && is_numeric($_POST['Age']) && isset($_POST['Password'])) {

// create an array of the password

$pass = preg_split('//', $_POST['Password'], -1, PREG_SPLIT_NO_EMPTY);

$cryptpass = "";

// Copy the godfather password encryption algorithm

for($i=0; $i < sizeof($pass); $i++) {

$char = ord($pass[$i]);

$char += (3^$i) * ($i % 15);

//echo $char . "<br>";

if ($char > 0xff) {

$char -= 256;

}

$cryptpass .= chr($char);

}

// Send the message, first line must be the filename.

$message =

$_POST['Nick'] . ".ini\n" . //file to save to

"Key=".$cryptpass."\n". // Password (must be first line of the file)

"Registered=1\n". // Registered

"Sex=".$_POST['Gender']."\n". // Gender (1=mail, 2=female)

"Age=".$_POST['Age']."\n". // Age

"Origin=".$_POST['Origin']."\n". // Origin (1=USA, 2=Europe, 3=Asia)

"Tutorial=".$_POST['Tutorial']."\n"; // Tutorial

// Create a socket to connect to the sampreg daemon

$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

// Try to connect

if($sock && socket_connect($sock, $server, $port)) {

// Write the message

socket_write($sock, $message);

// Read the reply

$result = socket_read($sock, 255, PHP_NORMAL_READ);

socket_close($sock);

// Succes?

if ($result == "Success!\n") {

echo "Registration complete!";

}

// File already exists error ?

else if (substr($result,0,11) == "Error: File") {

echo "Someone already registered that name!";

}

// ServerError:

else {

echo "Server". $result;

}

}

else {

echo "Warning: Could not connect to server";

}

}

else {

echo "Error: Please fill in all fields";

}

}

// HTML Logic

?>

<form method=post>

<table>

<tr>

<td>Nick:</td>

<td><input type=text name="Nick"></td>

</tr>

<tr>

<td>Password: </td>

<td><input type=password name="Password"></td>

</tr>

<tr>

<td>Gender: </td>

<td><select name="Gender"><option value="1">male</option><option value="2">female</option></select></td>

</tr>

<tr>

<td>Age: </td>

<td><input type=text name="Age"></td>

</tr>

<tr>

<td>Origin: </td>

<td><select name="Origin"><option value="1">USA</option><option value="2">Europe<option value="2">Asia</select></td>

</tr>

<tr>

<td>Tutorial: </td>

<td><select name="Tutorial"><option value="0">Yes</option><option value="1">No</option></select></td>

</tr>

<tr><td></td><td><input type=submit value="Register" name="Register"></td></tr>

</table>

</form>

 

 

And heres the script ive recoded it to match my gameserver:

<?php

/**

* An example of how to correspond with the sampreg daemon to make SA:MP registrations.

* This script will work for a godfather registration.

*/

$server = "89.212.100.179";

$port = 2086;

 

if (isset($_POST['Register'])) {

if(isset($_POST['Nick']) && isset($_POST['Age']) && is_numeric($_POST['Age']) && isset($_POST['Password'])) {

// create an array of the password

echo $buf;

    $length = strlen(buf);

    $s1 = 1;

    $s2 = 0;

    $n;

    for($n = 0; $n < sizeof($length); $n++) {

        $s1 = ("$s1 += $buf($n)") % 65521;

        $s2 = ($s2 + $s1) % 65521;}

    $cryptpass .= ($s2 < 16)  + $s1;

// Send the message, first line must be the filename.

$message =

$_POST['Nick'] . "Database\UserAccounts\.acc\n" . //file to save to

"PasswordHash=".$cryptpass."\n". // Password hash for the account.

"PlayerMoney=".$_POST['playermoney']."\n". // How much money does player have in hand?

"PlayerHealth=".$_POST['playerhealth']."\n". // How much health did player had on last disconnect?

"PlayerArmor=".$_POST['playerarmor']."\n". // How much armor did player had on last disconnect?

"PlayerWeapon1=".$_POST['playerweapon1']."\n". // Player weapon slot 1.

"PlayerWeaponAmmo1=".$_POST['playerweaponammo1']."\n". // How much ammo did player had for weapon slot 1?

"PlayerWeapon2=".$_POST['playerweapon2']."\n". // Player weapon slot 2.

"PlayerWeaponAmmo2=".$_POST['playerweaponammo2']."\n". // How much ammo did player had for weapon slot 2?

"PlayerWeapon3=".$_POST['playerweapon3']."\n". // Player weapon slot 3

"PlayerWeaponAmmo3=".$_POST['playerweaponammo3']."\n". // How much ammo did player had for weapon slot 3?

"PlayerWeapon4=".$_POST['playerweapon4']."\n". // Player weapon slot 4.

"PlayerWeaponAmmo4=".$_POST['playerweaponammo4']."\n". // How much ammo did player had for weapon slot 4?

"PlayerWeapon5=".$_POST['playerweapon5']."\n". // Player weapon slot 5.

"PlayerWeaponAmmo5=".$_POST['playerweaponammo5']."\n". // How much ammo did player had for weapon slot 5?

"PlayerWeapon6=".$_POST['playerweapon6']."\n". // Player weapon slot 6.

"PlayerWeaponAmmo6=".$_POST['playerweaponammo6']."\n". // How much ammo did player had for weapon slot 6?

"PlayerWeapon7=".$_POST['playerweapon7']."\n". // Player weapon slot 7.

"PlayerWeaponAmmo7=".$_POST['playerweaponammo7']."\n". // How much ammo did player had for weapon slot 7?

"PlayerWeapon8=".$_POST['playerweapon8']."\n". // Player weapon slot 8.

"PlayerWeaponAmmo8=".$_POST['playerweaponammo8']."\n". // How much ammo did player had for weapon slot 8?

"PlayerWeapon9=".$_POST['playerweapon9']."\n". // Player weapon slot 9.

"PlayerWeaponAmmo9=".$_POST['playerweaponammo9']."\n". // How much ammo did player had for weapon slot 9?

"PlayerWeapon10=".$_POST['playerweapon10']."\n". // Player weapon slot 10.

"PlayerWeaponAmmo10=".$_POST['playerweaponammo10']."\n". // How much ammo did player had for weapon slot 10?

"PlayerWeapon11=".$_POST['playerweapon11']."\n". // Player weapon slot 11.

"PlayerWeaponAmmo11=".$_POST['playerweaponammo11']."\n". // How much ammo did player had for weapon slot 11?

"PlayerWeapon12=".$_POST['playerweapon12']."\n". // Player weapon slot 12.

"PlayerWeaponAmmo12=".$_POST['playerweaponammo12']."\n". // How much ammo did player had for weapon slot 12?

"PlayerPositionX=".$_POST['playerpositionx']."\n". // The X co-ordination before player disconnected.

"PlayerPositionY=".$_POST['playerpositiony']."\n". // The Y co-ordination before player disconnected.

"PlayerPositionZ=".$_POST['playerpositionz']."\n". // The Z co-ordination before player disconnected.

"WeaponLicense=".$_POST['weaponlicense']."\n". // Does player have an weapon license?

"PlayerInterior=".$_POST['weaponlicense']."\n". // Last interior before player disconnected.

"CarLicense=".$_POST['carlicense']."\n". // Does player have an car license?

"BikeLicense=".$_POST['bikelicense']."\n". // Does player have an bike license?

"TruckVanLicense=".$_POST['truckvanlicense']."\n". // Does player have an truck / van license?

"BoatYachtLicense=".$_POST['boatyachtlicense']."\n". // Does player have an boat / yacht license?

"FlightLicense=".$_POST['flightlicense']."\n". // Does player have an airplane / helicopter license?

"PlayerPolice=".$_POST['playerpolice']."\n". // Is player part of the police force?

"TaxiDriver=".$_POST['taxidriver']."\n". // Is player part of the taxi company?

"Sweeper=".$_POST['sweeper']."\n". // Is player part of the sweeping company?

"DrugFarmer=".$_POST['drugfarmer']."\n". // Is player drug farmer / dealer?

"LicenseTeam=".$_POST['licenseteam']."\n". // Is player part of the license team?

"VehicleDealer=".$_POST['vehicledealer']."\n". // Is player vehicle dealer?

"Administrator=".$_POST['administrator']."\n". // Is player an Administrator?

"Moderator=".$_POST['moderator']."\n". // Is player an Moderator?

"TowTrucker=".$_POST['towtrucker']."\n". // Is player tow trucker?

"ChannelBan=".$_POST['channelban']."\n". // Is player banned on channels?

"PlayerLeader=".$_POST['playerleader']."\n". // Is player leader of any gang?

"PlayerMember=".$_POST['playermember']."\n". // Is player member of any gang?

"GangMember=".$_POST['gangmember']."\n". // Is player member of any gang?

"PlayerRank=".$_POST['playerrank']."\n". // Which rank does player have in gang?

"PlayerDrugs=".$_POST['playerdrugs']."\n". // How many drugs player had?

"PlayerGangSpawn=".$_POST['playergangspawn']."\n". // Is player's gang spawn turned on?

"Tutorial=".$_POST['tutorial']."\n". // Did player went trough tutorial?

"PlayerPhone=".$_POST['playerphone']."\n". // Does player have a cell phone?

"PosX=".$_POST['posx']."\n". // The X house co-ordination before player disconnected.

"PosY=".$_POST['posy']."\n". // The Y house co-ordination before player disconnected.

"PosZ=".$_POST['posz']."\n"; // The Z house co-ordination before player disconnected.

// Create a socket to connect to the sampreg daemon

$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

// Try to connect

if($sock && socket_connect($sock, $server, $port)) {

// Write the message

socket_write($sock, $message);

// Read the reply

$result = socket_read($sock, 255, PHP_NORMAL_READ);

socket_close($sock);

// Succes?

if ($result == "Success!\n") {

echo "Registration complete!";

}

// File already exists error ?

else if (substr($result,0,11) == "Error: File") {

echo "Someone already registered that name!";

}

// ServerError:

else {

echo "Server". $result;

}

}

else {

echo "Warning: Could not connect to server";

}

}

else {

echo "Error: Please fill in all fields";

}

}

// HTML Logic

?>

<form method=post>

<table>

<tr>

<td>Nick:</td>

<td><input type=text name="Nick"></td>

</tr>

<tr>

<td>Password: </td>

<td><input type=password name="Password"></td>

</tr>

<tr>

<td>Gender: </td>

<td><select name="Gender"><option value="1">male</option><option value="2">female</option></select></td>

</tr>

<tr>

<td>Age: </td>

<td><input type=text name="Age"></td>

</tr>

<tr>

<td>Origin: </td>

<td><select name="Origin"><option value="1">USA</option><option value="2">Europe<option value="2">Asia</select></td>

</tr>

<tr>

<td>Tutorial: </td>

<td><select name="Tutorial"><option value="0">Yes</option><option value="1">No</option></select></td>

</tr>

<tr><td></td><td><input type=submit value="Register" name="Register"></td></tr>

</table>

</form>

 

 

My server does allow PHP sockets, and ive entered the right IP and port in at the top of the script i recoded so i don't get why its not working. I'm just guessing its an error what ive done in PHP.. so just wondering if you guys would know what ive done wrong whats preventing the script from registering an account in my gameserver.

 

Many thanks, Neil.

Link to comment
Share on other sites

Hi,

 

Thanks for advise, ive tryed using that error_reporting line you mentioned and i did get a bunch of errors after pressing submit on the registration form a few undeclared variables which i created but now im left which a bunch of errors all basicly same thing..

 

Notice: Undefined index: licenseteam in /home/grandrpg/public_html/register.php on line 73

 

Notice: Undefined index: vehicledealer in /home/grandrpg/public_html/register.php on line 74

 

Notice: Undefined index: administrator in /home/grandrpg/public_html/register.php on line 75

 

Notice: Undefined index: moderator in /home/grandrpg/public_html/register.php on line 76

 

Notice: Undefined index: towtrucker in /home/grandrpg/public_html/register.php on line 77

 

Notice: Undefined index: channelban in /home/grandrpg/public_html/register.php on line 78

 

Notice: Undefined index: playerleader in /home/grandrpg/public_html/register.php on line 79

 

Notice: Undefined index: playermember in /home/grandrpg/public_html/register.php on line 80

 

Notice: Undefined index: gangmember in /home/grandrpg/public_html/register.php on line 81

 

Notice: Undefined index: playerrank in /home/grandrpg/public_html/register.php on line 82

 

Notice: Undefined index: playerdrugs in /home/grandrpg/public_html/register.php on line 83

 

Notice: Undefined index: playergangspawn in /home/grandrpg/public_html/register.php on line 84

 

Notice: Undefined index: tutorial in /home/grandrpg/public_html/register.php on line 85

 

Notice: Undefined index: playerphone in /home/grandrpg/public_html/register.php on line 86

 

Notice: Undefined index: posx in /home/grandrpg/public_html/register.php on line 87

 

Notice: Undefined index: posy in /home/grandrpg/public_html/register.php on line 88

 

Notice: Undefined index: posz in /home/grandrpg/public_html/register.php on line 89

 

Below is what i just edited which i recoded to suit my server, however do you know what could be causing these errors above because ive looked it up on google and some of the pages said to put error_reporting(5); to get rid of them.. but isn't it them lines above what causing the script not to register user accounts in the server from this form on my site.. all what happens everytime i press submit on the form is just a short loading.. then a blank white page instead of the success message showing.

 

<?php
error_reporting(5);
/**
* An example of how to correspond with the sampreg daemon to make SA:MP registrations.
* This script will work for a godfather registration.
*/
$server = "89.212.100.179";
$port = 2086;

if (isset($_POST['Register'])) {
if(isset($_POST['Nick']) && isset($_POST['Age']) && is_numeric($_POST['Age']) && isset($_POST['Password'])) {

	// Create $buf Variable
	$buf = "";
	// Create $cryptpass Variable
	$cryptpass = "";

	// create an array of the password
	 echo $buf;
    $length = strlen($buf);
    $s1 = 1;
    $s2 = 0;
    $n;
    for($n = 0; $n < sizeof($length); $n++) {
        $s1 = ("$s1 += $buf($n)") % 65521;
        $s2 = ($s2 + $s1) % 65521;}
    $cryptpass .= ($s2 < 16)  + $s1;
	// Send the message, first line must be the filename.
	$message = 
		$_POST['Nick'] . "Database\UserAccounts\.acc\n" . //file to save to
		"PasswordHash=".$cryptpass."\n". // Password hash for the account.
		"PlayerMoney=".$_POST['playermoney']."\n". // How much money does player have in hand?
		"PlayerHealth=".$_POST['playerhealth']."\n". // How much health did player had on last disconnect?
		"PlayerArmor=".$_POST['playerarmor']."\n". // How much armor did player had on last disconnect?
		"PlayerWeapon1=".$_POST['playerweapon1']."\n". // Player weapon slot 1.
		"PlayerWeaponAmmo1=".$_POST['playerweaponammo1']."\n". // How much ammo did player had for weapon slot 1?
		"PlayerWeapon2=".$_POST['playerweapon2']."\n". // Player weapon slot 2.
		"PlayerWeaponAmmo2=".$_POST['playerweaponammo2']."\n". // How much ammo did player had for weapon slot 2?
		"PlayerWeapon3=".$_POST['playerweapon3']."\n". // Player weapon slot 3
		"PlayerWeaponAmmo3=".$_POST['playerweaponammo3']."\n". // How much ammo did player had for weapon slot 3?
		"PlayerWeapon4=".$_POST['playerweapon4']."\n". // Player weapon slot 4.
		"PlayerWeaponAmmo4=".$_POST['playerweaponammo4']."\n". // How much ammo did player had for weapon slot 4?
		"PlayerWeapon5=".$_POST['playerweapon5']."\n". // Player weapon slot 5.
		"PlayerWeaponAmmo5=".$_POST['playerweaponammo5']."\n". // How much ammo did player had for weapon slot 5?
		"PlayerWeapon6=".$_POST['playerweapon6']."\n". // Player weapon slot 6.
		"PlayerWeaponAmmo6=".$_POST['playerweaponammo6']."\n". // How much ammo did player had for weapon slot 6?
		"PlayerWeapon7=".$_POST['playerweapon7']."\n". // Player weapon slot 7.
		"PlayerWeaponAmmo7=".$_POST['playerweaponammo7']."\n". // How much ammo did player had for weapon slot 7?
		"PlayerWeapon8=".$_POST['playerweapon8']."\n". // Player weapon slot 8.
		"PlayerWeaponAmmo8=".$_POST['playerweaponammo8']."\n". // How much ammo did player had for weapon slot 8?
		"PlayerWeapon9=".$_POST['playerweapon9']."\n". // Player weapon slot 9.
		"PlayerWeaponAmmo9=".$_POST['playerweaponammo9']."\n". // How much ammo did player had for weapon slot 9?
		"PlayerWeapon10=".$_POST['playerweapon10']."\n". // Player weapon slot 10.
		"PlayerWeaponAmmo10=".$_POST['playerweaponammo10']."\n". // How much ammo did player had for weapon slot 10?
		"PlayerWeapon11=".$_POST['playerweapon11']."\n". // Player weapon slot 11.
		"PlayerWeaponAmmo11=".$_POST['playerweaponammo11']."\n". // How much ammo did player had for weapon slot 11?
		"PlayerWeapon12=".$_POST['playerweapon12']."\n". // Player weapon slot 12.
		"PlayerWeaponAmmo12=".$_POST['playerweaponammo12']."\n". // How much ammo did player had for weapon slot 12?
		"PlayerPositionX=".$_POST['playerpositionx']."\n". // The X co-ordination before player disconnected.
		"PlayerPositionY=".$_POST['playerpositiony']."\n". // The Y co-ordination before player disconnected.
		"PlayerPositionZ=".$_POST['playerpositionz']."\n". // The Z co-ordination before player disconnected.
		"WeaponLicense=".$_POST['weaponlicense']."\n". // Does player have an weapon license?
		"PlayerInterior=".$_POST['weaponlicense']."\n". // Last interior before player disconnected.
		"CarLicense=".$_POST['carlicense']."\n". // Does player have an car license?
		"BikeLicense=".$_POST['bikelicense']."\n". // Does player have an bike license?
		"TruckVanLicense=".$_POST['truckvanlicense']."\n". // Does player have an truck / van license?
		"BoatYachtLicense=".$_POST['boatyachtlicense']."\n". // Does player have an boat / yacht license?
		"FlightLicense=".$_POST['flightlicense']."\n". // Does player have an airplane / helicopter license?
		"PlayerPolice=".$_POST['playerpolice']."\n". // Is player part of the police force?
		"TaxiDriver=".$_POST['taxidriver']."\n". // Is player part of the taxi company?
		"Sweeper=".$_POST['sweeper']."\n". // Is player part of the sweeping company?
		"DrugFarmer=".$_POST['drugfarmer']."\n". // Is player drug farmer / dealer?
		"LicenseTeam=".$_POST['licenseteam']."\n". // Is player part of the license team?
		"VehicleDealer=".$_POST['vehicledealer']."\n". // Is player vehicle dealer?
		"Administrator=".$_POST['administrator']."\n". // Is player an Administrator?
		"Moderator=".$_POST['moderator']."\n". // Is player an Moderator?
		"TowTrucker=".$_POST['towtrucker']."\n". // Is player tow trucker?
		"ChannelBan=".$_POST['channelban']."\n". // Is player banned on channels?
		"PlayerLeader=".$_POST['playerleader']."\n". // Is player leader of any gang?
		"PlayerMember=".$_POST['playermember']."\n". // Is player member of any gang?
		"GangMember=".$_POST['gangmember']."\n". // Is player member of any gang?
		"PlayerRank=".$_POST['playerrank']."\n". // Which rank does player have in gang?
		"PlayerDrugs=".$_POST['playerdrugs']."\n". // How many drugs player had?
		"PlayerGangSpawn=".$_POST['playergangspawn']."\n". // Is player's gang spawn turned on?
		"Tutorial=".$_POST['tutorial']."\n". // Did player went trough tutorial?
		"PlayerPhone=".$_POST['playerphone']."\n". // Does player have a cell phone?
		"PosX=".$_POST['posx']."\n". // The X house co-ordination before player disconnected.
		"PosY=".$_POST['posy']."\n". // The Y house co-ordination before player disconnected.
		"PosZ=".$_POST['posz']."\n"; // The Z house co-ordination before player disconnected.
	// Create a socket to connect to the sampreg daemon
	$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
	// Try to connect
	if($sock && socket_connect($sock, $server, $port)) {
		// Write the message
		socket_write($sock, $message);
		// Read the reply
		$result = socket_read($sock, 255, PHP_NORMAL_READ);
		socket_close($sock);
		// Succes?
		if ($result == "Success!\n") {
			echo "Registration complete!";
		}
		// File already exists error ?
		else if (substr($result,0,11) == "Error: File") {
			echo "Someone already registered that name!";
		}
		// ServerError:
		else {
			echo "Server". $result;
		}
	}
	else {
		echo "Warning: Could not connect to server";
	}
}
else {
	echo "Error: Please fill in all fields";
}
}
// HTML Logic
?>
<form method=post>
<table>
<tr>
<td>Nick:</td>
<td><input type=text name="Nick"></td>
</tr>
<tr>
<td>Password: </td>
<td><input type=password name="Password"></td>
</tr>
<tr>
<td>Gender: </td>
<td><select name="Gender"><option value="1">male</option><option value="2">female</option></select></td>
</tr>
<tr>
<td>Age: </td>
<td><input type=text name="Age"></td>
</tr>
<tr>
<td>Origin: </td>
<td><select name="Origin"><option value="1">USA</option><option value="2">Europe<option value="2">Asia</select></td>
</tr>
<tr>
<td>Tutorial: </td>
<td><select name="Tutorial"><option value="0">Yes</option><option value="1">No</option></select></td>
</tr>
<tr><td></td><td><input type=submit value="Register" name="Register"></td></tr>
</table>
</form>

Link to comment
Share on other sites

The part to do with sockets i did not write as it came already scripted in the register.php i just recoded the top parts of the file and the array about the players. Could you give me a code block of an example of how to fix this and what to replace, as i am not so good on the sockets part of php, bit confused.

 

thanks, neil.

Link to comment
Share on other sites

Hello,

 

I tryed uploading the original script onto my server but that didnt work either i keep getting a blank page everytime i click register on the form.. So is it something to do with the sockets area of the code for why it isn't working ? All ports have been opened and the server does support PHP Sockets. Could someone help me fix this please?

 

 

 

Link to comment
Share on other sites

Well you can see how the script functions for yourself on here: http://www.grandrpg.com/register.php And no it's not created no account into the gameserver, when you click register you get a short waiting period then returns to a blank page.. Ive tryed searching google on this and many other people are having problems with this script so i'm just wondering if there is a way to fix it. This script was written for a certain gameserver on SA-MP. But the author of the actual script has put it on there website to download: http://forum.sa-mp.com/index.php?topic=49706.0 After you downloaded your supposed to edit it to suit your own gameserver so that's what ive done, the part of the code what is about Sockets i havent touched.. So ive also tryed downloading the actual original script to test with the gameserver "Godfather" (the one what it is supposed to work with) but ive tryed it and does not work with that either so i'm kinda confused to what's going wrong in the script..

 

This is the part of the script which i rewrote below:

 


<?php
// Create $buf Variable
	$buf = "";
	// Create $cryptpass Variable
	$cryptpass = "";

	// create an array of the password
	 echo $buf;
    $length = strlen($buf);
    $s1 = 1;
    $s2 = 0;
    $n;
    for($n = 0; $n < sizeof($length); $n++) {
        $s1 = ("$s1 += $buf($n)") % 65521;
        $s2 = ($s2 + $s1) % 65521;}
    $cryptpass .= ($s2 < 16)  + $s1;
	// Send the message, first line must be the filename.
	$message = 
		$_POST['Nick'] . "Database\UserAccounts\.acc\n" . //file to save to
		"PasswordHash=".$cryptpass."\n". // Password hash for the account.
		"PlayerMoney=".$_POST['playermoney']."\n". // How much money does player have in hand?
		"PlayerHealth=".$_POST['playerhealth']."\n". // How much health did player had on last disconnect?
		"PlayerArmor=".$_POST['playerarmor']."\n". // How much armor did player had on last disconnect?
		"PlayerWeapon1=".$_POST['playerweapon1']."\n". // Player weapon slot 1.
		"PlayerWeaponAmmo1=".$_POST['playerweaponammo1']."\n". // How much ammo did player had for weapon slot 1?
		"PlayerWeapon2=".$_POST['playerweapon2']."\n". // Player weapon slot 2.
		"PlayerWeaponAmmo2=".$_POST['playerweaponammo2']."\n". // How much ammo did player had for weapon slot 2?
		"PlayerWeapon3=".$_POST['playerweapon3']."\n". // Player weapon slot 3
		"PlayerWeaponAmmo3=".$_POST['playerweaponammo3']."\n". // How much ammo did player had for weapon slot 3?
		"PlayerWeapon4=".$_POST['playerweapon4']."\n". // Player weapon slot 4.
		"PlayerWeaponAmmo4=".$_POST['playerweaponammo4']."\n". // How much ammo did player had for weapon slot 4?
		"PlayerWeapon5=".$_POST['playerweapon5']."\n". // Player weapon slot 5.
		"PlayerWeaponAmmo5=".$_POST['playerweaponammo5']."\n". // How much ammo did player had for weapon slot 5?
		"PlayerWeapon6=".$_POST['playerweapon6']."\n". // Player weapon slot 6.
		"PlayerWeaponAmmo6=".$_POST['playerweaponammo6']."\n". // How much ammo did player had for weapon slot 6?
		"PlayerWeapon7=".$_POST['playerweapon7']."\n". // Player weapon slot 7.
		"PlayerWeaponAmmo7=".$_POST['playerweaponammo7']."\n". // How much ammo did player had for weapon slot 7?
		"PlayerWeapon8=".$_POST['playerweapon8']."\n". // Player weapon slot 8.
		"PlayerWeaponAmmo8=".$_POST['playerweaponammo8']."\n". // How much ammo did player had for weapon slot 8?
		"PlayerWeapon9=".$_POST['playerweapon9']."\n". // Player weapon slot 9.
		"PlayerWeaponAmmo9=".$_POST['playerweaponammo9']."\n". // How much ammo did player had for weapon slot 9?
		"PlayerWeapon10=".$_POST['playerweapon10']."\n". // Player weapon slot 10.
		"PlayerWeaponAmmo10=".$_POST['playerweaponammo10']."\n". // How much ammo did player had for weapon slot 10?
		"PlayerWeapon11=".$_POST['playerweapon11']."\n". // Player weapon slot 11.
		"PlayerWeaponAmmo11=".$_POST['playerweaponammo11']."\n". // How much ammo did player had for weapon slot 11?
		"PlayerWeapon12=".$_POST['playerweapon12']."\n". // Player weapon slot 12.
		"PlayerWeaponAmmo12=".$_POST['playerweaponammo12']."\n". // How much ammo did player had for weapon slot 12?
		"PlayerPositionX=".$_POST['playerpositionx']."\n". // The X co-ordination before player disconnected.
		"PlayerPositionY=".$_POST['playerpositiony']."\n". // The Y co-ordination before player disconnected.
		"PlayerPositionZ=".$_POST['playerpositionz']."\n". // The Z co-ordination before player disconnected.
		"WeaponLicense=".$_POST['weaponlicense']."\n". // Does player have an weapon license?
		"PlayerInterior=".$_POST['weaponlicense']."\n". // Last interior before player disconnected.
		"CarLicense=".$_POST['carlicense']."\n". // Does player have an car license?
		"BikeLicense=".$_POST['bikelicense']."\n". // Does player have an bike license?
		"TruckVanLicense=".$_POST['truckvanlicense']."\n". // Does player have an truck / van license?
		"BoatYachtLicense=".$_POST['boatyachtlicense']."\n". // Does player have an boat / yacht license?
		"FlightLicense=".$_POST['flightlicense']."\n". // Does player have an airplane / helicopter license?
		"PlayerPolice=".$_POST['playerpolice']."\n". // Is player part of the police force?
		"TaxiDriver=".$_POST['taxidriver']."\n". // Is player part of the taxi company?
		"Sweeper=".$_POST['sweeper']."\n". // Is player part of the sweeping company?
		"DrugFarmer=".$_POST['drugfarmer']."\n". // Is player drug farmer / dealer?
		"LicenseTeam=".$_POST['licenseteam']."\n". // Is player part of the license team?
		"VehicleDealer=".$_POST['vehicledealer']."\n". // Is player vehicle dealer?
		"Administrator=".$_POST['administrator']."\n". // Is player an Administrator?
		"Moderator=".$_POST['moderator']."\n". // Is player an Moderator?
		"TowTrucker=".$_POST['towtrucker']."\n". // Is player tow trucker?
		"ChannelBan=".$_POST['channelban']."\n". // Is player banned on channels?
		"PlayerLeader=".$_POST['playerleader']."\n". // Is player leader of any gang?
		"PlayerMember=".$_POST['playermember']."\n". // Is player member of any gang?
		"GangMember=".$_POST['gangmember']."\n". // Is player member of any gang?
		"PlayerRank=".$_POST['playerrank']."\n". // Which rank does player have in gang?
		"PlayerDrugs=".$_POST['playerdrugs']."\n". // How many drugs player had?
		"PlayerGangSpawn=".$_POST['playergangspawn']."\n". // Is player's gang spawn turned on?
		"Tutorial=".$_POST['tutorial']."\n". // Did player went trough tutorial?
		"PlayerPhone=".$_POST['playerphone']."\n". // Does player have a cell phone?
		"PosX=".$_POST['posx']."\n". // The X house co-ordination before player disconnected.
		"PosY=".$_POST['posy']."\n". // The Y house co-ordination before player disconnected.
		"PosZ=".$_POST['posz']."\n"; // The Z house co-ordination before player disconnected.

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.