Quote:
Originally Posted by xsrf
If your item will not send to your character just replace the function with this:
PHP Code:
// API
private function SendAPICmd( $ServerIndex, $dwPlayerId, $dwTargetId, $dwCommand = 101, $dwParam1, $dwParam2, $dwParam3 )
{
$socket = socket_create( AF_INET, SOCK_STREAM, SOL_TCP );
$packet = pack( "VVVVVVVV", $ServerIndex, $dwPlayerId, $dwTargetId, $dwCommand, $dwParam1, $dwParam2, $dwParam3, BILLING_CHECK1, BILLING_CHECK2 );
if( @socket_connect( $socket, BILLING_IP, BILLING_PORT ) )
{
socket_write( $socket, $packet, strlen( $packet ) );
socket_close( $socket );
return true;
}
return false;
}
// Create Item
public static function CreateItem( $dwTargetId, $dwItemId, $dwItemCount )
{
if( !is_numeric( $dwItemId ) )
{
$SQL = new MSSQL( true );
$Query = "USE [ITEM_DBF] SELECT * FROM [ITEM_TBL] WHERE [szName] = %s";
$dwItemId = $SQL->Exec( $Query, $dwItemId ) ? $SQL->fetch[0]['dwID'] : false;
if( !is_numeric( $dwItemId ) )
return false;
}
return CDPSrvr::SendAPICmd( 01, (int)$dwTargetId, (int)$dwTargetId, $dwItemId, $dwItemCount, 0 );
|
I have the same function
web shop works when player is offline when i use shop in site
but when i use web shop in game my dpoins lost but item doesn't send
and in php log this error
[27-Dec-2015 12:16:16 Europe/Paris] PHP Strict standards: Non-static method CDPSrvr::SendAPICmd() should not be called statically in C:\wamp\www\shop\include\class\class.dpsrvr.php on line 29
[27-Dec-2015 12:16:16 Europe/Paris] PHP Stack trace:
[27-Dec-2015 12:16:16 Europe/Paris] PHP 1. {main}() C:\wamp\www\shop\ChargeFlyffItem.php:0
[27-Dec-2015 12:16:16 Europe/Paris] PHP 2. CDPSrvr::CreateItem() C:\wamp\www\shop\ChargeFlyffItem.php:39
help mee please!!!
web shop works when player is offline when i use shop in site
but when i use web shop in game my dpoins lost but item doesn't send
and in php log this error
[27-Dec-2015 12:16:16 Europe/Paris] PHP Strict standards: Non-static method CDPSrvr::SendAPICmd() should not be called statically in C:\wamp\www\shop\include\class\class.dpsrvr.php on line 29
[27-Dec-2015 12:16:16 Europe/Paris] PHP Stack trace:
[27-Dec-2015 12:16:16 Europe/Paris] PHP 1. {main}() C:\wamp\www\shop\ChargeFlyffItem.php:0
[27-Dec-2015 12:16:16 Europe/Paris] PHP 2. CDPSrvr::CreateItem() C:\wamp\www\shop\ChargeFlyffItem.php:39
help mee please!!!