Hello,
I had 2 issues recently.
Issue 1 :
I tried to create custom Radios.I used CreateRadioStream( 11, "Test", "Test.adf", 1 ); to create my Radio.Although I can tune in the radio in my car but i cannot listen anything in it.I used .adf files because VC uses them as a default so if i need to use a different extension please inform.
Issue 2 :
I was making a Prop System but faced a difficulty at buying the prop.
*Honey Bought Property[ ( Mansion ) ] ID [ 0 ].
The ID and the Name are fine but the database is saved by the owner name as player.ID.This is my command :
else if ( cmd == "buyprop" )
{
local id = player.ID;
if ( !player.IsSpawned ) MessagePlayer( "[#FF0000][EFE] You haven't spawned yet..", player );
else if ( !text ) MessagePlayer( "[#FF0000][EFE] Error - /" + cmd + " <ID>", player );
else {
if ( GetRegistered( player ) == 0 ) MessagePlayer( "[#FF0000][EFE] Error - You must be a registered user to use this command", player );
else if ( status[player.ID].LoggedIn == 0 ) MessagePlayer( "[#FF0000][EFE] Error - You must be logged in to use this command", player );
else if ( !IsNum( text ) ) MessagePlayer( "[#FF0000][EFE] Error - ID must be Numbers", player );
else {
local s = QuerySQL( g_DB, "SELECT * FROM Props" );
local q = QuerySQL( g_DB, "SELECT * FROM Props WHERE ID LIKE '" + text + "'" );
if ( player.Cash < GetSQLColumnData( q, 2 ) ) MessagePlayer( "[#FF0000][EFE] Error - You need $" + GetSQLColumnData( q, 2 ) + " to Buy this!", player );
//if ( GetSQLColumnData( s, 4 ) == "None" )
else
{
if ( s )
{
QuerySQL( g_DB, "UPDATE Props SET Owner='" + player.Name + "' WHERE rowid LIKE = '" + text + "'" );
Message( "** " + player.Name + " Bought Property:[ " + GetSQLColumnData( s, 1 ) + " ] ID:[ " + text + " ]" );
//Announce( "~h~Property Purchased!", player, 0 );
// DecreaseCash( player, GetSQLColumnData( q, 2 ).tointeger() );
local data = GetSQLColumnData( s, 2 );
local cash = status[ player.ID ].Cash;
local det = cash - data;
local add = cash - data;
status[ player.ID ].Cash = det;
player.Cash= add;
}
else MessagePlayer( "[#FF0000][EFE] The Prop Not found in the Database!", player );
}
}
}
}