Admin commands isn't coverage in select VIP notes

Admin commands can create house for V.I.P House's note only. It doesn't cover Select House's note. It is also in create garage and vehicle.
Reported-by: Pichai Lertwachirakul ( zekodef )
Reported-by: Charlyn Secretaria ( Dead_Pool2k4 )
Acked-by: Lorenc Pekaj ( zeelorenc )
Signed-off-by: Pichai Lertwachirakul ( zekodef )
This commit is contained in:
Pichai Lertwachirakul 2019-10-07 15:26:19 +07:00 committed by GitHub
parent 1738657ff7
commit b0b593e84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,7 +151,7 @@ CMD:creategarage( playerid, params[ ] )
{ {
mysql_format( mysql_format(
dbHandle, szBigString, sizeof( szBigString ), dbHandle, szBigString, sizeof( szBigString ),
"SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P Garage%%' ) AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1", "SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P Garage%%' OR `NOTE` LIKE '{FFDC2E}Select Garage%%') AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1",
IsPlayerConnected( pID ) ? GetPlayerAccountID( pID ) : 0 IsPlayerConnected( pID ) ? GetPlayerAccountID( pID ) : 0
); );
mysql_tquery( dbHandle, szBigString, "OnAdminCreateGarage", "ddd", playerid, pID, cost ); mysql_tquery( dbHandle, szBigString, "OnAdminCreateGarage", "ddd", playerid, pID, cost );
@ -695,7 +695,7 @@ CMD:createcar( playerid, params[ ] )
if ( ( iModel = GetVehicleModelFromName( vName ) ) != -1 ) { if ( ( iModel = GetVehicleModelFromName( vName ) ) != -1 ) {
mysql_format( mysql_format(
dbHandle, szBigString, sizeof( szBigString ), dbHandle, szBigString, sizeof( szBigString ),
"SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P Vehicle%%' ) AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1", "SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P Vehicle%%' OR `NOTE` LIKE '{FFDC2E}Select Vehicle%%') AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1",
GetPlayerAccountID( pID ) GetPlayerAccountID( pID )
); );
mysql_tquery( dbHandle, szBigString, "OnAdminCreateVehicle", "ddd", playerid, pID, iModel ); mysql_tquery( dbHandle, szBigString, "OnAdminCreateVehicle", "ddd", playerid, pID, iModel );
@ -862,7 +862,7 @@ CMD:createhouse( playerid, params[ ] )
{ {
mysql_format( mysql_format(
dbHandle, szBigString, sizeof( szBigString ), dbHandle, szBigString, sizeof( szBigString ),
"SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P House%%' ) AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1", "SELECT * FROM `NOTES` WHERE (`NOTE` LIKE '{FFDC2E}V.I.P House%%' OR `NOTE` LIKE '{FFDC2E}Select House%%') AND USER_ID=%d AND `DELETED` IS NULL LIMIT 0,1",
IsPlayerConnected( pID ) ? GetPlayerAccountID( pID ) : 0 IsPlayerConnected( pID ) ? GetPlayerAccountID( pID ) : 0
); );
mysql_tquery( dbHandle, szBigString, "OnAdminCreateHouse", "ddd", playerid, pID, cost ); mysql_tquery( dbHandle, szBigString, "OnAdminCreateHouse", "ddd", playerid, pID, cost );