Raised This Month: $ Target: $400
 0% 

cs_get_user_team HELP!!!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-02-2006 , 21:27   Re: cs_get_user_team HELP!!!!
Reply With Quote #1

You make absolutely no sense, and neither does your plugin. Can you please explain with English that isn't totally broken and without ending everything you say with "plz help"?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
BloodyNuker
Member
Join Date: Jan 2006
Old 07-02-2006 , 21:50   Re: cs_get_user_team HELP!!!!
Reply With Quote #2

In spanish the game name is MANCHA but in english i donīt know, i search and probably spot is called, hawk.. sorry mi english ;)

I donīt say plz do my a plugin... :/
I ask why in event_damage i canīt show the player team, and i test your help and donīt work :ī(

The plugin do thease:

The terrorist persecute the counter-terrorist

When a terrorist attack a counter-terrorist the healt recover because i need doesnīt die.

The terrorist transfered to Counter terrorist and the Counter-Terrorist transfered to Terrorist.

All that I said works perfect

The problem is here...

If the attacker is a terrorist it has to be slaped the Counter-terrorist

Why my first example donīt work good?

I post the plugin completly

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <cstrike> #include <fun> new ctnum, ct[32], tnum, t[32] public plugin_init() {    register_plugin("Mancha","1.0.0","lol")    register_event("Damage", "Event_Damage", "b", "2!0", "3=0", "4!0" );    register_event("ResetHUD", "sp_on", "be")    return PLUGIN_CONTINUE } public client_putinserver(id) { set_task(1.0, "client_verificacion1", id, "b") } public client_verificacion1(id) { if( !is_user_connected(id) ) { return PLUGIN_HANDLED; } client_print(0,print_chat,"[MANCHA] El terrorista es la MANCHA, los CTS CORRAN!!!") cs_set_user_money(id, 0,1) strip_user_weapons(id); give_item(id, "weapon_knife") get_players(t, tnum, "eg", "TERRORIST") get_players(ct, ctnum, "eg", "CT") if(tnum == 1) {         } else { cs_set_user_team(id,CS_TEAM_CT) } if(tnum == 0) { cs_set_user_team(id,CS_TEAM_T)      } cs_set_user_money(id, 0,1) cs_set_user_armor (id, 999, CsArmorType:2) set_user_health(id, 999) cs_set_weapon_ammo(id, 0) return PLUGIN_CONTINUE } public Event_Damage() {     new damage = read_data(2);     new victim = read_data(0);     new attacker = get_user_attacker(victim) cs_set_user_team(victim,CS_TEAM_T) cs_set_user_team(attacker,CS_TEAM_CT) set_user_health(attacker, 999) set_user_health(victim, 999) cs_set_user_armor (attacker, 999, CsArmorType:2) cs_set_user_armor (victim, 999, CsArmorType:2)             new newFrags = get_user_frags(victim) - 1             set_user_frags(victim,newFrags) if(cs_get_user_team(victim) == CS_TEAM_CT) { user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) }    return PLUGIN_CONTINUE } public sp_on(id) {       set_task(0.1, "client_verificacion1", id, "b")    return PLUGIN_CONTINUE }


Show... this is the problem :@

Code:
if(cs_get_user_team(victim) == CS_TEAM_CT) { user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) }

If somebody can help welcome it is.
Sorry hawk if I made you anger
BloodyNuker is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 07-02-2006 , 22:45   Re: cs_get_user_team HELP!!!!
Reply With Quote #3

You're problem is simple

Code:
#cs_set_user_team(victim,CS_TEAM_T) cs_set_user_team(attacker,CS_TEAM_CT) set_user_health(attacker, 999) set_user_health(victim, 999) cs_set_user_armor (attacker, 999, CsArmorType:2) cs_set_user_armor (victim, 999, CsArmorType:2)             new newFrags = get_user_frags(victim) - 1             set_user_frags(victim,newFrags) #if(cs_get_user_team(victim) == CS_TEAM_CT) { user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) user_slap(victim, 0) }

You set their team to T then check if its CT so it would never happen.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-03-2006 , 09:30   Re: cs_get_user_team HELP!!!!
Reply With Quote #4

The CT (victim) isn't getting slapped because you set his team to CS_TEAM_T.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 07-03-2006 , 10:27   Re: cs_get_user_team HELP!!!!
Reply With Quote #5

I wasn't giving you code bloodynucker I was highlighting your problem code.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 07-03-2006 , 10:53   Re: cs_get_user_team HELP!!!!
Reply With Quote #6

Quote:
Originally Posted by Suicid3
I wasn't giving you code bloodynucker I was highlighting your problem code.
lmao, he wants this?
-Terrorist attacks Counter-Terrorist
-Counter-Terrorist Heals, and gets slapped?
-same Vice-Versa?

I'm sort of confused on what he wants.
TheNewt is offline
BloodyNuker
Member
Join Date: Jan 2006
Old 07-03-2006 , 11:30   Re: cs_get_user_team HELP!!!!
Reply With Quote #7

Tnkz for all the plugin work perfect!!

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <cstrike> #include <fun> new ctnum, ct[32], tnum, t[32] public plugin_init() {    register_plugin("Mancha","1.0.0","lol")    register_event("Damage", "Event_Damage", "b", "2!0", "3=0", "4!0" );    register_event("ResetHUD", "sp_on", "be")    return PLUGIN_CONTINUE } public client_putinserver(id) { set_task(1.0, "client_verificacion1", id, "b") } public client_verificacion1(id) { if( !is_user_connected(id) ) { return PLUGIN_HANDLED; } client_print(0,print_chat,"[MANCHA] El terrorista es la MANCHA, los CTS CORRAN!!!") cs_set_user_money(id, 0,1) strip_user_weapons(id); give_item(id, "weapon_knife") get_players(t, tnum, "eg", "TERRORIST") get_players(ct, ctnum, "eg", "CT") if(tnum == 1) {         } else { cs_set_user_team(id,CS_TEAM_CT) } if(tnum == 0) { cs_set_user_team(id,CS_TEAM_T)      } cs_set_user_money(id, 0,1) cs_set_user_armor (id, 999, CsArmorType:2) set_user_health(id, 999) cs_set_weapon_ammo(id, 0) return PLUGIN_CONTINUE } public Event_Damage(id) {     new victim = id     if(!is_user_alive(victim))         return PLUGIN_CONTINUE     new attacker = get_user_attacker(victim)     //new damage = read_data(2)     set_user_health(attacker, 999)     set_user_health(victim, 999)     cs_set_user_armor(attacker, 999, CsArmorType:2)     cs_set_user_armor(victim, 999, CsArmorType:2)     new CsTeams:VicTeam = cs_get_user_team(victim)     if(VicTeam == CS_TEAM_CT)     {             user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)         user_slap(victim, 0)     new newFrags = get_user_frags(victim) - 1     set_user_frags(victim,newFrags)     }     cs_set_user_team(victim, CS_TEAM_T)     cs_set_user_team(attacker, CS_TEAM_CT)     return PLUGIN_CONTINUE } public sp_on(id) {       set_task(0.1, "client_verificacion1", id, "b")    return PLUGIN_CONTINUE }
BloodyNuker 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 08:02.


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