Raised This Month: $51 Target: $400
 12% 

WHATS WRONG here ? PLEASE need help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zpoke
Senior Member
Join Date: Aug 2009
Location: Sweden
Old 08-10-2009 , 17:37   WHATS WRONG here ? PLEASE need help
Reply With Quote #1

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <colorchat>

#define TASK_TIME 10.0

new gMsg_SayText;

public plugin_init()
{
register_plugin("Health Chance", "1", "Zpoke");
register_logevent("round_start", 2, "1=Round_Start");

gMsg_SayText = get_user_msgid("SayText");
}
public round_start()
{
set_task(TASK_TIME, "give_stuff");
}
public give_stuff()
{
new players[32], num;
get_players(players, num, "ah");

new player;

for(new i = 0; i < num; i++)
{
player = players[i];

if(random_num(0, 20) <= 3)
{
set_pev(player, pev_health, 150.0);
ColorChat(player, RED, "Lucky you.. you got a healthpack with 50hp. (3/20 chance)");
}
if(random_num(0, 50) <= 5)
{
set_pev(player, pev_health, 200.0);
ColorChat(player, RED, "Lucky you.. you got a healthpack with 100hp. (5/50 chance)");
}
}

if(random_num(0, 100) <= 25)
{
cs_set_user_armor(player, 100, CS_ARMOR_VESTHELM);
ColorChat(player, RED, "Lucky you.. you got a Kevlar and Helm. (25/100 chance)");
}
if(random_num(0, 100) <= 1)
{
set_pev(player, pev_health, 1.0);

ColorChat(player, RED, "Bad Luck! You lost 99 HP. (1/100 chance)");

new name[32];
get_user_name( player, name, 32);
ColorChat(0, RED, "Bad Luck! %s just got 1 HP now", name);
}
}
stock fm_give_item(index, const item[]) {
if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10))
return 0

new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item));
if (!pev_valid(ent))
return 0

new Floatrigin[3]
pev(index, pev_origin, origin)
set_pev(ent, pev_origin, origin)
set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)
dllfunc(DLLFunc_Spawn, ent)

new save = pev(ent, pev_solid)
dllfunc(DLLFunc_Touch, ent, index)
if (pev(ent, pev_solid) != save)
return ent

engfunc(EngFunc_RemoveEntity, ent)

return -1
}
stock fm_get_weapon_id(index, const weapon[])
{
new ent = -1;

while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", weapon)) != 0)
{
if(index == pev(ent, pev_owner))
return ent;
}
return 0;
}
stock print_green(id,const fmt[],{Float,_}:...) {
if(id && !is_user_connected(id)) return 0

static buffer[192]
buffer[0] = '^x04'
vformat(buffer[1],190, fmt,3)

message_begin(id ? MSG_ONE : MSG_ALL,gMsg_SayText,{0,0,0},id)
write_byte(id)
write_string(buffer)
message_end()

return 1
}
Zpoke is offline
glorian
BANNED
Join Date: Mar 2009
Location: Surfplace.se
Old 08-10-2009 , 18:04   Re: WHATS WRONG here ? PLEASE need help
Reply With Quote #2

What plugin are u working on?
glorian is offline
Send a message via MSN to glorian
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 08-10-2009 , 18:11   Re: WHATS WRONG here ? PLEASE need help
Reply With Quote #3

mmm, use PHP plis. Or Attath the sma.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 08-10-2009 , 18:18   Re: WHATS WRONG here ? PLEASE need help
Reply With Quote #4

It compiles for me...
Attached Files
File Type: sma Get Plugin or Get Source (wtf.sma - 611 views - 2.6 KB)
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-10-2009 , 21:01   Re: WHATS WRONG here ? PLEASE need help
Reply With Quote #5

Quote:
Originally Posted by Zpoke View Post
WHATS WRONG here ?
You need to learn how to post a real question. You need tell us what is "wrong" and we might be able to help you find a solution.
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode