I have already mention check command there is error posted
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu else if ( cmd == "shareprop" )
{
if ( !text ) MessagePlayer( "Use /shareprop <Nick/ID> <Prop>", player );
local id = player.ID
if ( !stats[ id ].Logged ) ePrivMessage( "[Error] - You're Not logged in..", player );
else if ( !player.IsSpawned ) ePrivMessage( "[Error] - You haven't spawned yet..", player );
else if ( !text ) ePrivMessage( "[Syntax] - !" + cmd + " <ID> <Nick>", player );
else if ( !IsNum( GetTok( text, " ", 1 ) ) ) ePrivMessage( "[Error] - ID must be Number..", player );
else if ( !PropExists( GetTok( text, " ", 1 ).tointeger() ) ) ePrivMessage( "[Error] - Invalid Prop ID", player );
[color=teal]It always give error here ( q does not exist ) [/color] if ( GetSQLColumnData( q, 3 ) != player.Name ) ePrivMessage( "[Error] - You don't own this Property", player );
else
{
local plr = GetPlayer( GetTok( text, " ", 2 ) );
if ( !plr ) ePrivMessage( "[Error] - Invalid Nick / ID", player );
else
{
QuerySQL( sqliteDB, "UPDATE Props SET Shared='" + plr.Name + "' WHERE rowid='" + GetTok( text, " ", 1 ) + "'" );
rPrivMessage( "You shared your Prop:[ " + GetSQLColumnData( q, 0 ) + " ] with: " + plr.Name + ".", player );
rPrivMessage( "Player " + player.Name + " shared Prop ID:[ " + GetTok( text, " ", 1 ) + " ] with you.", plr );
}
}
}
else if ( cmd == "setpassword" )
{
if( stats[ player.ID ].Logged == false ) MessagePlayer( "Error - You don't have Login acess.", player);
else if ( stats[ player.ID ].Level < 7 ) MessagePlayer( "Error - You don't have access to it.", player);
else if ( !text ) qPrivMessage( "Syntax, " + cmd + " [Nick/ID] [Password]",player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) qPrivMessage( "Error: Invalid Player.",player );
else {
local newpass = GetTok( text, " ", 2);
if ( newpass == null ) qPrivMessage("Enter A Valid Password.",player );
else {
qPrivMessage("Admin " + player + " Set Your Password To: " + newpass + ".", plr);
qPrivMessage(" Changed Password Of " + plr.Name + " To: " + newpass + ".", player);
QuerySQL(sqliteDB,"UPDATE Accounts SET Password='" + SHA256( password ) + "' WHERE Name='" + plr.Name + "'");
}
}
}
}