|
Senior Member
|

07-19-2014
, 14:07
Few errors, Any help?
|
#1
|
PHP Code:
public FwdCmdStart(id, handle) { if ( !g_connected[id] ) return FMRES_IGNORED; static buttons, oldbuttons; buttons = get_uc(handle, UC_Buttons); oldbuttons = entity_get_int(id, EV_INT_oldbuttons); if ( g_alive[id] && ( buttons & IN_USE ) && !( oldbuttons & IN_USE ) && !g_has_hud_text[id] ) { static ent, body; get_user_aiming(id, ent, body, 9999); if ( IsBlock(ent) ) { static block_type; block_type = entity_get_int(ent, EV_INT_body); static property[5]; static message[512], len; len = format(message, charsmax(message), "%s %s^nType: %s", PLUGIN_PREFIX, PLUGIN_VERSION, g_block_names[block_type]); if ( g_property1_name[block_type][0] ) { GetProperty(ent, 1, property); if ( ( block_type == BUNNYHOP || block_type == ICEBHOP || block_type == NO_SLOW_DOWN_BUNNYHOP ) && property[0] == '1' ) { len += format(message[len], charsmax(message) - len, "^n%s", g_property1_name[block_type]); } else if ( block_type == SLAP ) { len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property1_name[block_type], property[0] == '3' ? "High" : property[0] == '2' ? "Medium" : "Low"); } else if ( block_type == SUFFER || block_type == HE_GRENADE || block_type == FLASHBANG || block_type == SMOKE_GRENADE ) { len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property1_name[block_type], property[0] == '3' ? "Counter-Terrorists" : property[0] == '2' ? "Terrorists" : "All"); } else if( block_type == WEAPON_BLOCK) { len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property1_name[block_type], g_szWeaponNames2[str_to_num(property)]); } else if ( block_type != BUNNYHOP && block_type != ICEBHOP && block_type != NO_SLOW_DOWN_BUNNYHOP ) { len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property1_name[block_type], property); } } if ( g_property2_name[block_type][0] ) { GetProperty(ent, 2, property); len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property2_name[block_type], property); } if ( g_property3_name[block_type][0] ) { GetProperty(ent, 3, property); if ( block_type == BOOTS_OF_SPEED || property[0] != '0' && !( property[0] == '2' && property[1] == '5' && property[2] == '5' ) ) { len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property3_name[block_type], property); } } if ( g_property4_name[block_type][0] ) { GetProperty(ent, 4, property); if(block_type == WEAPON_BLOCK) { len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property4_name[block_type], property[0] == '3' ? "All" : property[0] == '2' ? "Counter-Terrorists" : "Terrorists"); } else { len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property4_name[block_type], property[0] == '1' ? "Yes" : "No"); } } set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel); show_hudmessage(id, message); } else if ( IsLight(ent) ) { static property1[5], property2[5], property3[5], property4[5]; GetProperty(ent, 1, property1); GetProperty(ent, 2, property2); GetProperty(ent, 3, property3); GetProperty(ent, 4, property4); set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel); show_hudmessage(id, "Type: Light^nRadius: %s^nColor Red: %s^nColor Green: %s^nColor Blue: %s", property1, property2, property3, property4); } else if ( IsBox(ent) ) { static property1[5], property2[5], property3[5], property4[5]; GetProperty(ent, 1, property1); GetProperty(ent, 2, property2); GetProperty(ent, 3, property3); GetProperty(ent, 4, property4); set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel); show_hudmessage(id, "Type: Box^nRadius: %s^nColor Red: %s^nColor Green: %s^nColor Blue: %s", property1, property2, property3, property4); } } if ( !g_grabbed[id] ) return FMRES_IGNORED; if ( ( buttons & IN_JUMP ) && !( oldbuttons & IN_JUMP ) ) if ( g_grab_length[id] > 72.0 ) g_grab_length[id] -= 16.0; if ( ( buttons & IN_DUCK ) && !( oldbuttons & IN_DUCK ) ) g_grab_length[id] += 16.0; if ( ( buttons & IN_ATTACK ) && !( oldbuttons & IN_ATTACK ) ) CmdAttack(id); if ( ( buttons & IN_ATTACK2 ) && !( oldbuttons & IN_ATTACK2 ) ) CmdAttack2(id); if ( ( buttons & IN_RELOAD ) && !( oldbuttons & IN_RELOAD ) ) { CmdRotate(id); set_uc(handle, UC_Buttons, buttons & ~IN_RELOAD); } if ( !is_valid_ent(g_grabbed[id]) ) { CmdRelease(id); return FMRES_IGNORED; } if ( !IsBlockInGroup(id, g_grabbed[id]) || g_group_count[id] < 1 ) { MoveGrabbedEntity(id); return FMRES_IGNORED; } static block; static Float:move_to[3]; static Float:offset[3]; static Float:origin[3]; MoveGrabbedEntity(id, move_to); for ( new i = 0; i <= g_group_count[id]; ++i ) { block = g_grouped_blocks[id][i]; if ( !IsBlockInGroup(id, block) ) continue; entity_get_vector(block, EV_VEC_vuser1, offset); origin[0] = move_to[0] - offset[0]; origin[1] = move_to[1] - offset[1]; origin[2] = move_to[2] - offset[2]; MoveEntity(id, block, origin, false); } return FMRES_IGNORED; }
PHP Code:
ShowPropertiesMenu(id, ent) { new menu[256], title[32], entry[64], property[5], line1[3], line2[3], line3[3], line4[3], num, block_type; block_type = entity_get_int(ent, EV_INT_body); format(title, charsmax(title), "\r[%s] \ySet Properties^n^n", PLUGIN_PREFIX); add(menu, charsmax(menu), title); if ( g_property1_name[block_type][0] ) { GetProperty(ent, 1, property); if ( block_type == BUNNYHOP || block_type == ICEBHOP || block_type == NO_SLOW_DOWN_BUNNYHOP ) { format(entry, charsmax(entry), "\r1. \w%s: %s^n", g_property1_name[block_type], property[0] == '1' ? "\yOn" : "\rOff"); } else if ( block_type == SLAP ) { format(entry, charsmax(entry), "\r1. \w%s: \y%s^n", g_property1_name[block_type], property[0] == '3' ? "High" : property[0] == '2' ? "Medium" : "Low"); } else if ( block_type == WEAPON_BLOCK ) { format(entry, charsmax(entry), "\r1. \w%s: \y%s^n", g_property1_name[block_type], g_szWeaponNames2[str_to_num(property)]); } else if ( block_type == SUFFER || block_type == HE_GRENADE || block_type == FLASHBANG || block_type == SMOKE_GRENADE ) { format(entry, charsmax(entry), "\r1. \w%s: \y%s^n", g_property1_name[block_type], property[0] == '3' ? "Counter-Terrorists" : property[0] == '2' ? "Terrorists" : "All"); } else { format(entry, charsmax(entry), "\r1. \w%s: \y%s^n", g_property1_name[block_type], property); } add(menu, charsmax(menu), entry); } else { format(line1, charsmax(line1), "^n"); } if ( g_property2_name[block_type][0] ) { if ( g_property1_name[block_type][0] ) { num = 2; } else { num = 1; } GetProperty(ent, 2, property); format(entry, charsmax(entry), "\r%d. \w%s: \y%s^n", num, g_property2_name[block_type], property); add(menu, charsmax(menu), entry); } else { format(line2, charsmax(line2), "^n"); } if ( g_property3_name[block_type][0] ) { if ( g_property1_name[block_type][0] && g_property2_name[block_type][0] ) { num = 3; } else if ( g_property1_name[block_type][0] || g_property2_name[block_type][0] ) { num = 2; } else { num = 1; } GetProperty(ent, 3, property); if ( block_type == BOOTS_OF_SPEED || property[0] != '0' && !( property[0] == '2' && property[1] == '5' && property[2] == '5' ) ) { format(entry, charsmax(entry), "\r%d. \w%s: \y%s^n", num, g_property3_name[block_type], property); } else { format(entry, charsmax(entry), "\r%d. \w%s: \rOff^n", num, g_property3_name[block_type]); } add(menu, charsmax(menu), entry); } else { format(line3, charsmax(line3), "^n"); } if ( 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] ) { num = 4; } else 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_property2_name[block_type][0] && g_property3_name[block_type][0] ) { num = 3; } else if ( g_property1_name[block_type][0] || g_property2_name[block_type][0] || g_property3_name[block_type][0] ) { num = 2; } else { num = 1; } GetProperty(ent, 4, property); if(block_type == WEAPON_BLOCK) { format(entry, charsmax(entry), "\r%d. \w%s: \y%s^n", num, g_property4_name[block_type], property[0] == '3' ? "All" : property[0] == '2' ? "Counter-Terrorists" : "Terrorists"); } else { format(entry, charsmax(entry), "\r%d. \w%s: %s^n", num, g_property4_name[block_type], property[0] == '1' ? "\yYes" : "\rNo"); } add(menu, charsmax(menu), entry); } else { format(line4, charsmax(line4), "^n"); } g_property_info[id][1] = ent; add(menu, charsmax(menu), line1); add(menu, charsmax(menu), line2); add(menu, charsmax(menu), line3); add(menu, charsmax(menu), line4); add(menu, charsmax(menu), "^n^n^n^n^n^n\r0. \wBack"); show_menu(id, g_keys_properties_menu, menu, -1, "BmPropertiesMenu"); }
PHP Code:
SetPropertiesBlockAiming(id) { ShowPropertiesMenu(id, ent); return PLUGIN_HANDLED; }
Line 4009:
PHP Code:
format(entry, charsmax(entry), "\r1. \w%s: \y%s^n", g_property1_name[block_type], g_szWeaponNames2[str_to_num(property)]);
Line: 1514
PHP Code:
len += format(message[len], charsmax(message) - len, "^n%s: %s", g_property1_name[block_type], g_szWeaponNames2[str_to_num(property)]);
Last edited by proffs; 07-19-2014 at 15:26.
|
|