Skip to content

Commit

Permalink
Command update
Browse files Browse the repository at this point in the history
- Returning the print only to the player who is calling the command
Note: requires the update on b3 customcommands for !stpr
  • Loading branch information
kristiandz committed Apr 5, 2021
1 parent 0a24566 commit af825ea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/cmd.gsx
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,14 @@ adminCommands( cmd, pickingType )

case "storedpr":
player = getPlayer( arg1, pickingType );
if( isDefined( player ) )
selected = getPlayer( int(cmd[2]), pickingType );
if( isDefined( player ) && isDefined (selected) )
{
scripts\sql::db_connect("ebc_b3_pm");
q_str = "SELECT prestige, backup_pr FROM player_core WHERE guid LIKE " + player GetGuid();
q_str = "SELECT prestige, backup_pr FROM player_core WHERE guid LIKE " + selected GetGuid();
SQL_Query(q_str);
row = SQL_FetchRow();
if(isDefined(row)) iprintln( "Stored prestige:^1 " + row[0] + "^7 Backup prestige: ^1" + row[1] );
if(isDefined(row)) player iprintln( "Stored prestige:^1 " + row[0] + "^7 Backup prestige: ^1" + row[1] );
SQL_Close();
}
break;
Expand Down

0 comments on commit af825ea

Please sign in to comment.