Nie sprawdzalem ale powinno dzialac
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#define ADMIN_VIP ADMIN_LEVEL_H
#define SCOREATTRIB_NONE 0
#define SCOREATTRIB_DEAD ( 1 << 0 )
#define SCOREATTRIB_BOMB ( 1 << 1 )
#define SCOREATTRIB_VIP ( 1 << 2 )
public plugin_init() {
register_plugin("Vip", "1.0", "newax");
register_event("ResetHUD", "resetModel", "b");
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/twoj_model_tt/twoj_model_tt.mdl")
precache_model("models/player/twoj_model_ct/twoj_model_ct.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_LEVEL_H) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "twoj_model_tt")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "twoj_model_ct")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
public fwHamPlayerSpawnPost(id){
if (get_user_flags(id) & ADMIN_LEVEL_H) {
set_user_health(id, 120);
set_user_armor(id, 100);
new kasa = cs_get_user_money(id);
cs_set_user_money(id, kasa + 700);
}
}
public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
new iPlayer = get_msg_arg_int( 1 );
if( is_user_connected( iPlayer )
&& ( get_user_flags( iPlayer ) & ADMIN_VIP ) ) {
set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1045{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1045{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
w miejscu twoj_model_tt wstaw nazwe swojeg modelu tt a w miejscu twoj_model_ct nazwe twojego modelu ct
PS. Kamizelka dodana a co do modeli to nie wiem mi dzialaja.
Użytkownik newax edytował ten post 05.07.2011 11:47