27.07.2016, 04:06
(
Последний раз редактировалось kampuman; 27.07.2016 в 06:50.
)
I need help. I'm trying to make my own Rename House script because the fs that I have downloaded doesn't have. So I'm not sure what exactly to do and how to make it right.
Edit: The dialogs is now showing but after after entering the value it didn't change the value. What could be the problem?
Edit: The dialogs is now showing but after after entering the value it didn't change the value. What could be the problem?
PHP код:
new housenumber = GetHouseID( playerid );
new MAX_HOUSE_NAME [20];
if ( strcmp( GetGVarStringEx( "h_Owner", housenumber ), PlayerName( playerid ), false ) )
return SendClientMessage( playerid, -1,""SV_RD"» {c8c8c8}This house isn't yours!" );
if ( strlen( MAX_HOUSE_NAME ) < 1 || strlen( MAX_HOUSE_NAME ) > 20 ) return ShowPlayerDialog(playerid, DIALOG_HOUSE_NAME, DIALOG_STYLE_INPUT, "Rename House", "Write a new name for this house:\n\n{E74C3C}The name you entered is either too short or too long.", "Change", "Back");
format( gsQuery, sizeof gsQuery, "UPDATE `houses` SET `HName` = '%s' WHERE `HouseID` = '%d'", MAX_HOUSE_NAME,housenumber );
mysql_query( gsQuery, THREAD_NONE, playerid );
format( gsString, sizeof( gsString ), ""W"Press "ORANGE_"H "W"key to Enter the House\n"SV_BL"House Name: "W"%s\n"SV_BL"House Owner: "W"%s\n "SV_BL"House Value: "W"%d$\n "SV_BL"House Privacy: "RED_"Closed\n"SV_BL"House ID: "ORANGE_"%d",GetGVarStringEx( "h_name", housenumber ), PlayerName(playerid), GetGVarInt( "h_Cost", housenumber),housenumber);
UpdateDynamic3DTextLabelText( Text3D:GetGVarInt( "House3DText", housenumber ), 0xFF9900FF, gsString );