Help with an action
Hia guys, can someone tell me what i did wrong in this?;
PHP Code:
ActionAWP(id, ent) { new Float:gametime = get_gametime(); if ( !( gametime >= g_gselection_next_use[id] ) && ( get_user_team ( id ) == 1 ) ) { if ( !g_has_hud_text[id] ) { set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2); show_hudmessage(id, "%s %s^nawp Block^nNext Use: 1 round", PLUGIN_PREFIX, PLUGIN_VERSION ); } return PLUGIN_HANDLED; } if(get_user_team(id) == 2) { if ( !g_has_hud_text[id] ) { set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2); show_hudmessage(id, "%s %s^nawp Block^nOnly Terrorists Can Use This Block", PLUGIN_PREFIX, PLUGIN_VERSION ); } return PLUGIN_HANDLED; } static property[5]; if(get_user_team(id) == 1) { cs_set_weapon_ammo(give_item(id, "weapon_awp"), 1); new awpname[42]; get_user_name(id, awpname, 32); set_hudmessage(255, 255, 255, -1.0, -1.0, 0, 6.0, 4.0); show_hudmessage(0, "Be careful CTs! %s has a awp!", awpname); } g_block_status[id] = true; GetProperty(ent, 2, property); g_awp_next_use[id] = gametime + str_to_float(property); return PLUGIN_HANDLED; }
i've got no idea what i did wrong :P its loading up correctly but its not giving the awp :s its a long time since ive been coding, be nice :)
|