Jump to content
GIGN Forum

Ka Izdarit Lai Plugins Darbojas


Recommended Posts

Vispirms.Ja ir gluzi ka gigna aizliegts ievietot sma vai amxx failus tad tas noziime ka visi parasti suuta txt

es jums pastastishu ka rikoties ja jums ir iedots pliks teksts

Lūk piemērs:

/*

* _______ _ _ __ __

* | _____/ | | | | \ \ __ / /

* | | | | | | | | / \ | |

* | | | |____| | | |/ __ \| |

* | | ___ | ______ | | / \ |

* | | |_ | | | | | | / \ |

* | | | | | | | | | | | |

* | |____| | | | | | | | | |

* |_______/ |_| |_| \_/ \_/

*

*

*

* Last Edited: 01-05-08

*

* ============

* Changelog:

* ============

*

* v1.0

* -Initial Release

*

*/

#define VERSION "1.0"

#include <amxmodx>

#include <amxmisc>

#define TE_BLOODSPRITE 115

new blood

new blood2

new dmgamount

new dmgcolor

public plugin_init()

{

register_plugin("Blood Color/Amount Management",VERSION,"GHW_Chronic")

register_event("Damage","Damage","3=DMG_BULLET")

register_concmd("amx_bloodcolors","cmdbc")

dmgamount = register_cvar("blood_amount","1")

dmgcolor = register_cvar("blood_color","229")

}

public plugin_precache()

{

blood = precache_model("sprites/blood.spr")

blood2 = precache_model("sprites/bloodspray.spr")

}

public Damage(id)

{

if(is_user_connected(id) && get_user_health(id)!=100 && get_pcvar_num(dmgamount))

{

new origin[3]

get_user_origin(id,origin)

new hitpoint, weapon

get_user_attacker(id,weapon,hitpoint)

switch(hitpoint)

{

case 1:

{

get_user_origin(id,origin,1)

}

case 2:

{

origin[2] += 25

}

case 3:

{

origin[2] += 10

}

case 4:

{

origin[2] += 10

origin[0] += 5

origin[1] += 5

}

case 5:

{

origin[2] += 10

origin[0] -= 5

origin[1] -= 5

}

case 6:

{

origin[2] -= 10

origin[0] += 5

origin[1] += 5

}

case 7:

{

origin[2] -= 10

origin[0] -= 5

origin[1] -= 5

}

}

message_begin(MSG_BROADCAST,SVC_TEMPENTITY)

write_byte(TE_BLOODSPRITE)

write_coord(origin[0])

write_coord(origin[1])

write_coord(origin[2])

switch(get_pcvar_num(dmgamount))

{

case 1:

{

write_short(blood)

write_short(blood)

}

case 2:

{

write_short(blood2)

write_short(blood)

}

default:

{

write_short(blood2)

write_short(blood2)

}

}

write_byte(get_pcvar_num(dmgcolor))

write_byte(10)

message_end()

}

}

public cmdbc(id)

{

show_motd(id,"<body bgcolor=black><center><font color=white><B>Note: Only colors after 127 work!</B><BR><BR><img src=^"http://forums.alliedmods.net/attachment.php?attachmentid=5979&d=1146477307^"></font></center></body>","Colors")

return PLUGIN_HANDLED

}

atveram Notepad,pēc tam iekopejam tekstu saglabajam failu ar nosaukumu GHW_Blood_Color.sma

jums automatiski tiks izveidots sma fails

iemetam scripting mape nokompilejam,pec tam ieejam compiled sameklejam amxx tad to GHW_Blood_Color.amxx iemetam plugins,pec tam ieejam configs mape atveram plugins.ini pasha apaksha pievienojam GHW_Blood_Color.amxx saglabajam un lietojam ;)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...