Property system help

Started by Nihongo^, Sep 13, 2016, 02:54 PM

Previous topic - Next topic

Nihongo^

i have a problem with prop when i pick any pickup it gave me wrong detail

Quotefunction onPickupPickedUp( player, pickup )

    pickup.RespawnTime = 2;
 if ( pickup.Model == 407 )
 {
     local q = QuerySQL( db, "SELECT * FROM Props WHERE rowid='" + pickup.ID + "'" );
  if ( q )
  {
  ePrivMessage( "===> " + GetSQLColumnData( q, 0 ) + " <===", player );
  ePrivMessage( "ID:[ " + pickup.ID + " ] Cost:[ $" + GetSQLColumnData( q, 1 ) + " ] Owner:[ " + GetSQLColumnData( q, 2 ) + " ] Share:[ " + GetSQLColumnData( q, 3 ) + " ]", player );
  ePrivMessage( "Forsale:[ " + CheckForsale( pickup.ID ) + " ]", player );
     }
 }
}

For @xmair   i was going to post it on Scripting and Server Management  but maybe i accidentally click Script Showroom hope some one move it

Saiyan Attack

function onPickupPickedUp( player, pickup )
{
if ( pickup.Model == 407 )
{
local q = QuerySQL( db, "SELECT Name, Cost, Owner, Shared FROM Props WHERE rowid='" + (pickup.ID+1) + "'" );
if ( q ) {
ePrivMessage( "===> " + GetSQLColumnData( q, 0 ) + " <===", player );
ePrivMessage( "ID:[ " + (pickup.ID+1) + " ] Cost:[ $" + GetSQLColumnData( q, 1 ) + " ] Owner:[ " + GetSQLColumnData( q, 2 ) + " ] Share:[ " + GetSQLColumnData( q, 3 ) + " ]", player );
ePrivMessage( "Forsale:[ " + CheckForsale( pickup.ID+1 ) + " ]", player );
pickup.RespawnTime=2000;
}
else pickup.RespawnTime=2000;
}
}
// I Hope This Will Works For You ....

Nihongo^

Thanks Saiyan it works :

Xmair

You dont use single quotes while using integers in SQL.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD