Hey, so I downloaded SCM v3.6, changed the models in it, and coded in a money block. But what doesnt work is properties, on top only, and no fall damage wich you only need to switch from yes to no works etc. But when you need to change a property via writing, it doesnt come up after i hit for example Transperecy, or money to give etc. And in the logs this error appear:
Server tried to send invalid command:"messagemode SBM_SetProperty
"
I've tried to fix it myself for a while now, but can't, and I can't find any tutorial out there either. So I am asking you, please help me.
Here is the code that is bugging:
public HandlePropertiesMenu(id, key)
{
new ent = g_property_info[id][1];
if ( !is_valid_ent(ent) )
{
SBM_Print(id, "That block has been deleted!");
g_viewing_properties_menu[id] = false;
ShowBlockMenu(id);
return PLUGIN_HANDLED;
}
new block_type = entity_get_int(ent, EV_INT_body);
switch ( key )
{
case K1:
{
if ( g_property1_name[block_type][0] )
{
g_property_info[id][0] = 1;
}
else if ( g_property2_name[block_type][0] )
{
g_property_info[id][0] = 2;
}
else if ( g_property3_name[block_type][0] )
{
g_property_info[id][0] = 3;
}
else
{
g_property_info[id][0] = 4;
}
if ( g_property_info[id][0] == 1
&& ( block_type == BUNNYHOP
|| block_type == SLAP
|| block_type == NO_SLOW_DOWN_BUNNYHOP ) )
{
ToggleProperty(id, 1);
}
else if ( g_property_info[id][0] == 4 )
{
ToggleProperty(id, 4);
}
else
{
client_cmd(id, "messagemode SBM_SetProperty");
SBM_Print(id, "Type the new property value for the block.%s", g_property_info[id][0] == 3 && block_type != BOOTS_OF_SPEED ? "^1 0^3 and^1 255^3 will turn transparency off." : g_blank);
}
}
case K2:
{
if ( g_property1_name[block_type][0] && g_property2_name[block_type][0]
|| g_property1_name[block_type][0] && g_property3_name[block_type][0]
|| g_property1_name[block_type][0] && g_property4_name[block_type][0]
|| g_property2_name[block_type][0] && g_property3_name[block_type][0]
|| g_property2_name[block_type][0] && g_property4_name[block_type][0]
|| g_property3_name[block_type][0] && g_property4_name[block_type][0] )
{
if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] )
{
g_property_info[id][0] = 2;
}
else if ( g_property1_name[block_type][0] && g_property3_name[block_type][0]
|| g_property2_name[block_type][0] && g_property3_name[block_type][0] )
{
g_property_info[id][0] = 3;
}
else
{
g_property_info[id][0] = 4;
}
if ( g_property_info[id][0] == 4 )
{
ToggleProperty(id, 4);
}
else
{
client_cmd(id, "messagemode SBM_SetProperty");
SBM_Print(id, "Type the new property value for the block.%s", g_property_info[id][0] == 3 && block_type != BOOTS_OF_SPEED ? "^1 0^3 and^1 255^3 will turn transparency off." : g_blank);
}
}
}
case K3:
{
if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property3_name[block_type][0]
|| g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property4_name[block_type][0]
|| g_property1_name[block_type][0] && g_property3_name[block_type][0] && g_property4_name[block_type][0]
|| g_property2_name[block_type][0] && g_property3_name[block_type][0] && g_property4_name[block_type][0] )
{
if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property3_name[block_type][0] )
{
g_property_info[id][0] = 3;
}
else
{
g_property_info[id][0] = 4;
}
if ( g_property_info[id][0] == 4 )
{
ToggleProperty(id, 4);
}
else
{
client_cmd(id, "messagemode SBM_SetProperty");
SBM_Print(id, "Type the new property value for the block.%s", g_property_info[id][0] == 3 && block_type != BOOTS_OF_SPEED ? "^1 0^3 and^1 255^3 will turn transparency off." : g_blank);
}
}
}
case K4:
{
if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] && g_property3_name[block_type][0] && g_property4_name[block_type][0] )
{
ToggleProperty(id, 4);
}
}
case K0:
{
g_viewing_properties_menu[id] = false;
ShowBlockMenu(id);
}
}
if ( key != K0 ) ShowPropertiesMenu(id, ent);
return PLUGIN_HANDLED;
}
Sorry for my bad english
Last edited by Qvantry; 02-27-2013 at 14:35.
|