prop info not showing

Started by Cool, Jun 29, 2016, 03:32 PM

Previous topic - Next topic

Cool

hello guys my property pickup working fine showing info but when i add this thing on pickupclaim my property pickup not working
function onPickupClaimPicked( player, pickup )
{
 if ( player.Health > 0 && wepPickups.rawin( pickup.ID ) )
 {
  PlaySound( player.UniqueWorld, 78, player.Pos );

  wepPickups.rawdelete( pickup.ID );
  pickup.Remove();

  return 1;
 }

 return 0;
}
function onPickupPickedUp( player, pickup )

if(pickup.Model == 407)
{
local id = pickup.ID+1, q = QuerySQL(sqliteDB,"SELECT * FROM Properties WHERE PropertyID='"+id+"'");
if (GetSQLColumnData(q,0) !=null)
{
local name = GetSQLColumnData(q, 0), owner = GetSQLColumnData(q, 4), sharer = GetSQLColumnData(q, 5), price = GetSQLColumnData(q, 6);
MessagePlayer(" [#4682B4][Info][#FFFFFF]ID: "+id+", Property Name ("+name+"), Price ("+price+"), Owner ("+owner+"), Sharer ("+sharer+")",player);
}
else return;
FreeSQLQuery(q);
pickup.RespawnTime = 5000;
}

  if ( pickup.Model == 512 ) {
  if ( pstats[ player.ID ].raceplayer ) {
   player.Cash+=10000;
   Message("[#4682B4][Info][#FFFFFF]"+player.Name + " have got 10000$.");
   pickup.Remove();
   Message("[#4682B4][Info][#FFFFFF]"+player.Name+" has won ." );
   closerace();
  }
  }
}

Thijn

You return 0 for pickups other then that heal pickup. Which means you aren't allowed to pickup any other.

Return 1 on onPickupClaimPicked and you should be good to go.

Cool

Thank you so much @Thijn
Topic locked