PDA

View Full Version : Editovat ako moze pls



Anonymous
29-12-2010, 13:01
Molim vas ako mozete da editujete ovaj VIP plugin da osim sve 3 bombe i manje gravitacije VIP imaju 150 hp i 200 armor,Hvala unaprijed...
Molio bih vas u .sma formatu ako moze.


#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME "Digital Community VIP"
#define PLUGIN_AUTHOR "BrundiX"
#define PLUGIN_VERSION "1.0"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the motd.")

register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers()

return PLUGIN_CONTINUE

}

public plugin_precache() {
precache_model("models/player/vip/vip.mdl")

return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_CVAR) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "vip")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "vip")
}
else {
cs_reset_user_model(id)
}
}

return PLUGIN_CONTINUE
}


public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

client_print(id, print_chat, "Digital Community:Kucaj /vip da vidis svoje vip privilegije!")

if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return PLUGIN_CONTINUE;
}

public admin_motd(id,level,cid) {

if (!cmd_access(id,level,cid,1))
return PLUGIN_CONTINUE

show_motd(id,"Svake runde VIP dobije sve tri vrste bomba ima manju gravitaciju,vise healta i armora!","BrundiX")
return PLUGIN_CONTINUE
}




public give_stuff(id)
{
if(!is_user_connected(id))
return;

fm_give_item(id, "item_assaultsuit");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
cs_set_user_money(id, cs_get_user_money(id) + 500);
set_user_gravity (id, 0.85);
}

public handle_say(id)
{
new said[192]
read_args(said,192)
if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
set_task(0.1,"print_viplist", id)
return PLUGIN_CONTINUE
}

public print_viplist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CVAR)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s VIP u igri: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Nema VIPA online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

Lucky
29-12-2010, 13:31
public give_stuff(id)
{
if(!is_user_connected(id))
return;

fm_give_item(id, "item_assaultsuit");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
cs_set_user_money(id, cs_get_user_money(id) + 500);
set_user_gravity (id, 0.85);
}


--->



public give_stuff(id)
{
if(!is_user_connected(id))
return;

fm_give_item(id, "item_assaultsuit");
fm_give_item(id, "item_assaultsuit");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
set_user_health(id, "150");
cs_set_user_money(id, cs_get_user_money(id) + 500);
set_user_gravity (id, 0.85);
}

Anonymous
29-12-2010, 13:51
Tnx puno a mozes li i za armor stavit bio bih ti jao zahvalan:D

Lucky
29-12-2010, 14:04
public give_stuff(id)
{
if(!is_user_connected(id))
return;

fm_give_item(id, "item_assaultsuit");
cs_set_user_armor(id, "200", CS_ARMOR_VESTHELM)
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
set_user_health(id, "150");
cs_set_user_money(id, cs_get_user_money(id) + 500);
set_user_gravity (id, 0.85);
}

Anonymous
29-12-2010, 14:09
Evo kad ovaj plugin stavim sa otim sto si mi ti dao izadje mi errora
Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/groups/amxmodx/tmp3/textIElynS.sma(93) : warning 217: loose indentation
/groups/amxmodx/tmp3/textIElynS.sma(100) : error 035: argument type mismatch (argument 2)

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textIElynS.amx (compile failed).
pa bih molio ako mozete da popravite to.

#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME "Digital Community VIP"
#define PLUGIN_AUTHOR "BrundiX"
#define PLUGIN_VERSION "1.0"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the motd.")

register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers()

return PLUGIN_CONTINUE

}

public plugin_precache() {
precache_model("models/player/vip/vip.mdl")

return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_CVAR) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "vip")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "vip")
}
else {
cs_reset_user_model(id)
}
}

return PLUGIN_CONTINUE
}


public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

client_print(id, print_chat, "Digital-Community:Kucaj /vip da vidis svoje VIP privilegije!")

if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return PLUGIN_CONTINUE;
}

public admin_motd(id,level,cid) {

if (!cmd_access(id,level,cid,1))
return PLUGIN_CONTINUE

show_motd(id,"VIP imaju vise healta, manju gravitaciju, i na pocetku svake runde dobiju sve tri vrste bomba.","BrundiX")
return PLUGIN_CONTINUE
}




public give_stuff(id)
{
if(!is_user_connected(id))
return;

fm_give_item(id, "item_assaultsuit");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
cs_set_user_money(id, cs_get_user_money(id) + 500);
set_user_gravity (id, 0.95);
set_user_health (id, "150");
}

public handle_say(id)
{
new said[192]
read_args(said,192)
if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
set_task(0.1,"print_viplist", id)
return PLUGIN_CONTINUE
}

public print_viplist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CVAR)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s VIP u igri: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Nema VIP-a online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

Lucky
29-12-2010, 14:13
set_user_health (id, "150"); --->
set_user_health (id, 150);

Anonymous
29-12-2010, 14:16
Hvala puno.Evo ti karme :D