SetForcedSkins returns true, and GetForcedSkins returns what i sent with SetForcedSkins, so the server did successfully receive the request.
Although everything looks like it works, i see no change.
Unless i misunderstood the use of this function?
In the changelog, it says:
So, if i understand it correctly, it's for allowing only a selected list of vehicles to be used, right?changelog wrote:SetForcedSkins()/GetForcedSkins(): new method to help people doing F1 or Monster trucks, ... competitions have everybody use a "good" skin. It allows to have an explicit list of allowed skins and replacement skins.)
Looking at the method help, i didn't understand much:
As I said, I didn't understand much, so i found this post by slig which helped me out a lot! (thanks slig)Defines a list of remappings for player skins. It expects a list of structs Orig, Name, Checksum, Url. Orig is the name of the skin to remap, or '*' for any other. Name, Checksum, Url define the skin to use. (They are optional, you may set value '' for any of those. All 3 null means same as Orig). Will only affect players connecting after the value is set. Only available to Admin.
He linked to a file where he showed a list he was using. I tried with one of his.
This is what i got:
Code: Select all
<?php require 'GbxRemote.inc.php'; $client = new IXR_Client_Gbx(); if (!$client->Init(5000)) die('"offline"'); if (!$client->query('Authenticate', 'SuperAdmin', 'SuperAdmin')) die('"Auth failed..."'); echo '<h2>Current settings:</h2><pre>'; $client->query('GetForcedSkins'); $res = $client->getResponse(); var_dump($res); echo '</pre>'; $req = $client->query('SetForcedSkins', array( array( 'Orig'=>'*', 'Name'=>'Skins/Vehicles/CarCommon/GPF1A_Black.zip', 'Checksum'=>'DD7FB67FCE93FD2D0BC8F55DD6C5A6AE', 'Url'=>'http://deditm.com/skin/gpf1/GPF1A_Black.zip' ) )); $res = $client->getResponse(); var_dump($req, $res); ?>
I have ,of course, rejoined the server.
I have tried putting the file in the skins folder on the server together with a .loc file.
I have also tried to restart, and skip challenge.
P2P is enabled.
Could someone explain to me what i am doing wrong. Or if i misunderstood the function of the method, please explain!
I hope someone will reply!