Vip
PooPPooPPooP 09.10.2012
Proszę o dodanie do vipa komend: /vips i /vip
/vips - vipy online
/vip - co daje vip
Dodanie do vipa grawitacji
Dodanie def (dla ct)
Dodanie (w miejsce bomb) VIP
Za wszystko będzie + : )
/vips - vipy online
/vip - co daje vip
Dodanie do vipa grawitacji
Dodanie def (dla ct)
Dodanie (w miejsce bomb) VIP
#include #include #include new bool:g_Vip[33]; public plugin_init(){ register_plugin("VIP Ultimate", "5.1.0.2", "benio101 & speedkill"); RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1); register_event("DeathMsg", "DeathMsg", "a"); } public client_authorized(id){ if(get_user_flags(id) & 524288 == 524288){ client_authorized_vip(id); } } public client_authorized_vip(id){ g_Vip[id]=true; } public client_disconnect(id){ if(g_Vip[id]){ client_disconnect_vip(id); } } public client_disconnect_vip(id){ g_Vip[id]=false; } public SpawnedEventPre(id){ if(g_Vip[id]){ if(is_user_alive(id)){ SpawnedEventPreVip(id); } } } public SpawnedEventPreVip(id){ set_user_health(id, get_user_health(id)+100); give_item(id, "p90"); if(get_user_team(id)%2){ give_item(id, "item_thighpack"); } } public DeathMsg(){ new killer=read_data(1); new victim=read_data(2); if(is_user_alive(killer) && g_Vip[killer]){ if(get_user_team(killer) != get_user_team(victim)){ new g_Hs=read_data(3); new g_Hp=get_user_health(killer); if(g_Hs){ if(g_Hp < 130){ if(g_Hp + 150 > 200){ new g_Dif = 200 - g_Hp; set_user_health(killer,g_Hp + g_Dif); } else set_user_health(killer,g_Hp + 150); } } else{ if(g_Hp < 200){ if(g_Hp + 100 > 200 ){ new g_Dif = 200 - g_Hp; set_user_health(killer,g_Hp + g_Dif); } else set_user_health(killer,g_Hp + 100); } } } } }
Za wszystko będzie + : )
PooPPooPPooP 09.10.2012
Wklejka 1isg1odsfuhw0 dodana przez Kawon, 09.10.2012 13:28
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101.
#include <amxmodx> #include <fun> #include <hamsandwich> new bool:g_Vip[33]; public plugin_init(){ register_plugin("VIP Ultimate", "5.1.0.2", "benio101 & speedkill"); RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1); register_event("DeathMsg", "DeathMsg", "a"); } public client_authorized(id) { if(get_user_flags(id) & 524288 == 524288) { client_authorized_vip(id); } } public client_authorized_vip(id) { g_Vip[id]=true; } public client_disconnect(id) { if(g_Vip[id]) { client_disconnect_vip(id); } } public client_disconnect_vip(id) { g_Vip[id]=false; } public SpawnedEventPre(id) { if(g_Vip[id]) { if(is_user_alive(id)) { SpawnedEventPreVip(id); } } } public SpawnedEventPreVip(id) { set_user_health(id, get_user_health(id)+100); give_item(id, "p90"); if(get_user_team(id)%2) { give_item(id, "item_thighpack"); } } public DeathMsg() { new killer=read_data(1); new victim=read_data(2); if(is_user_alive(killer) && g_Vip[killer]) { if(get_user_team(killer) != get_user_team(victim)) { new g_Hs=read_data(3); new g_Hp=get_user_health(killer); if(g_Hs) { if(g_Hp < 130) { if(g_Hp + 150 > 200) { new g_Dif = 200 - g_Hp; set_user_health(killer,g_Hp + g_Dif); } else { set_user_health(killer,g_Hp + 150); } } else { if(g_Hp < 200) { if(g_Hp + 100 > 200 ) { new g_Dif = 200 - g_Hp; set_user_health(killer,g_Hp + g_Dif); } else { set_user_health(killer,g_Hp + 100); } } } } } } }
sNH.
09.10.2012
Jeżeli nikt tego nie zrobi, to będziesz miał działający kod ode mnie do wieczora ;d
Proszę.. Sprawdź
#include <amxmodx>
#include <colorchat>
#include <fun>
#include <hamsandwich>
new Array:g_Array, bool:g_Vip[33];
new const g_Langcmd[][]={"say /vips","say_team /vips","say /vipy","say_team /vipy"};
public plugin_init(){
register_plugin("VIP Ultimate", "5.1.0.2", "benio101 & speedkill");
RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
register_message(get_user_msgid("ScoreAttrib"), "g_VipStatus");
g_Array=ArrayCreate(64,32);
for(new i;i<sizeof g_Langcmd;i++)
register_clcmd(g_Langcmd[i],"g_Vips");
register_clcmd("say /vip", "g_ShowMotd");
register_event("DeathMsg", "DeathMsg", "a");
}
public client_authorized(id){
if(get_user_flags(id) & 524288 == 524288){
client_authorized_vip(id);
}
}
public client_authorized_vip(id){
g_Vip[id]=true;
new g_Name[64];
get_user_name(id,g_Name,charsmax(g_Name));
ArrayPushString(g_Array,g_Name);
}
public client_disconnect(id){
if(g_Vip[id]){
client_disconnect_vip(id);
}
}
public client_disconnect_vip(id){
g_Vip[id]=false;
new Name[64];
get_user_name(id,Name,charsmax(Name));
new g_Size = ArraySize(g_Array);
new g_Name[64];
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
if(equal(g_Name,Name)){
ArrayDeleteItem(g_Array,i);
break;
}
}
}
public SpawnedEventPre(id){
if(g_Vip[id]){
if(is_user_alive(id)){
SpawnedEventPreVip(id);
}
}
}
public SpawnedEventPreVip(id){
set_user_health(id, get_user_health(id)+100);
give_item(id, "p90");
set_user_gravity(id, 1.125);
if(get_user_team(id)%2){
give_item(id, "item_thighpack");
}
}
public g_VipStatus(){
new id=get_msg_arg_int(1);
if(is_user_alive(id) && g_Vip[id])
set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);
}
public g_Vips(id){
new g_Name[64],g_Message[192];
new g_Size=ArraySize(g_Array);
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
add(g_Message, charsmax(g_Message), g_Name);
if(i == g_Size - 1)
add(g_Message, charsmax(g_Message), ".");
else
add(g_Message, charsmax(g_Message), ", ");
}
ColorChat(id,GREEN,"^x03Vipy ^x04na ^x03serwerze : ^x04%s", g_Message);
}
public client_infochanged(id){
if(g_Vip[id]){
new szName[64];
get_user_info(id,"name",szName,charsmax(szName));
ArrayPushString(g_Array,szName);
new Name[64];
get_user_name(id,Name,charsmax(Name));
new g_Size=ArraySize(g_Array);
new g_Name[64];
for(new i = 0; i < g_Size; i++){
ArrayGetString(g_Array, i, g_Name, charsmax(g_Name));
if(equal(g_Name,Name)){
ArrayDeleteItem(g_Array,i);
break;
}
}
}
}
public plugin_end(){
ArrayDestroy(g_Array);
}
public g_ShowMotd(id){
if(is_user_connected(id))
show_motd(id, "vip.txt", "Informacje o vipie");
}
public DeathMsg()
{
new killer=read_data(1);
new victim=read_data(2);
if(is_user_alive(killer) && g_Vip[killer])
{
if(get_user_team(killer) != get_user_team(victim))
{
new g_Hs=read_data(3);
new g_Hp=get_user_health(killer);
if(g_Hs)
{
if(g_Hp < 130)
{
if(g_Hp + 150 > 200)
{
new g_Dif = 200 - g_Hp;
set_user_health(killer,g_Hp + g_Dif);
}
else
{
set_user_health(killer,g_Hp + 150);
}
}
else
{
if(g_Hp < 200)
{
if(g_Hp + 100 > 200 )
{
new g_Dif = 200 - g_Hp;
set_user_health(killer,g_Hp + g_Dif);
}
else
{
set_user_health(killer,g_Hp + 100);
}
}
}
}
}
}
}
Proszę.. Sprawdź
PooPPooPPooP 09.10.2012
Nie działa:
grawitacja
def
Błędy:
/vips (pokazuje 2 razy tego samego vipa, czyli:
Vipy na serwerze: PooPPooPPooP, PooPPooPPooP.)
Za naprawienie poleci +
grawitacja
def
Błędy:
/vips (pokazuje 2 razy tego samego vipa, czyli:
Vipy na serwerze: PooPPooPPooP, PooPPooPPooP.)
Za naprawienie poleci +
MarWit
09.10.2012
Wiadomość wygenerowana automatycznie
Ten temat został zamknięty przez moderatora.
Powód: Autor tematu zbanowany
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL
Ten temat został zamknięty przez moderatora.
Powód: Autor tematu zbanowany
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL