AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   SCM Properties *HELP* (https://forums.alliedmods.net/showthread.php?t=209613)

Qvantry 02-27-2013 14:33

SCM Properties *HELP*
 
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

ironskillz1 02-27-2013 15:27

Re: SCM Properties *HELP*
 
Quote:

Originally Posted by Qvantry (Post 1903193)
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

Change all this in the plugin SBM_SetProperty
To this

SetProperty



If You didnt understand
Replace all this SBM_SetProperty
To this SetProperty

Qvantry 03-01-2013 18:55

Re: SCM Properties *HELP*
 
No, it still doesnt work, I have replaced every single SBM_SetProperty, but I still get the same error that it sends and invalid command "messagemode SBM_SetProperty". I've searched in amx studio for SBM_SetProperty.
But nothing shows, so I can guarantee that everything is replaced.

YamiKaitou 03-01-2013 19:45

Re: SCM Properties *HELP*
 
Nothing you can do, Valve blocked the command

ironskillz1 03-02-2013 18:12

Re: SCM Properties *HELP*
 
Quote:

Originally Posted by YamiKaitou (Post 1904714)
Nothing you can do, Valve blocked the command

It still works for me and my freinds and i got all the new updates

YamiKaitou 03-02-2013 19:07

Re: SCM Properties *HELP*
 
Quote:

Originally Posted by ironskillz1 (Post 1905364)
It still works for me and my freinds and i got all the new updates

Then you probably have the client cvar cl_filterstuffcmd set to 0


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

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