modai
Posted: 2011 Feb 11 21:49
Code: Select all
#include <amxmodx>#include <cstrike>#include <fun>#include <amxmisc>#include <hamsandwich> new hes[33], knife[33], hsm[33], touch_weapons[33] public plugin_init(){ register_plugin("SMS Modai", "0.1", "aurimasko") register_concmd("sms_he", "he", ADMIN_USER) register_concmd("sms_knf", "knf", ADMIN_USER) RegisterHam(Ham_Touch, "weaponbox", "nelietimas");}public he(){ new players[32], pnum, tempid; get_players(players,pnum,"a") for( new i; i<pnum; i++) { tempid = players[i]; if(is_user_connected(tempid) && is_user_alive(tempid)) { hes[tempid] = true strip_user_weapons(tempid) give_item(tempid, "weapon_hegrenade") cs_set_user_bpammo(tempid, CSW_HEGRENADE,10000) touch_weapons[tempid] = true } }} public knf(){ new players[32], pnum, tempid; get_players(players,pnum,"a") for( new i; i<pnum; i++) { tempid = players[i]; if(is_user_connected(tempid) && is_user_alive(tempid)) { knife[tempid] = true strip_user_weapons(tempid) give_item(tempid, "weapon_knife") touch_weapons[tempid] = true } }} public nelietimas(weapon[], id){ if(!is_user_connected(id)) return HAM_IGNORED; if (touch_weapons[id]) return HAM_SUPERCEDE; return HAM_IGNORED;} public server_changelevel( map[] ){ new players[32], pnum, tempid; get_players(players,pnum,"a") for( new i; i<pnum; i++) { tempid = players[i]; hes[tempid] = false knife[tempid] = false hsm[tempid] = false }}
Ir kad visi kurie prisijungs į serverį taip pat pagal modą gautų tai ką reikia(he arba knife)
Ir taip testusi visą mapą.