Raised This Month: $ Target: $400
 0% 

SCM Properties *HELP*


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Qvantry
Junior Member
Join Date: Aug 2012
Old 02-27-2013 , 14:33   SCM Properties *HELP*
Reply With Quote #1

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.
Qvantry is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode