Can't teamswap dead players
It swaps players that are alive but non dead.
Not sure why, I have tried many different ways. PHP Code:
|
Re: Can't teamswap dead players
Never faced such problem, what version of amx are you using? Anyway, here are some corrections to your code.
Code:
public SwapTeams() |
Re: Can't teamswap dead players
Quote:
This worked for some reason: Obviously not pretty.. Thanks for your reply. I will test the code and try some more. PHP Code:
|
Re: Can't teamswap dead players
Adding user_silentkill(id) solved this problem for me!
edit: nvm it did not.. wtf There seems to be something wrong with cs_get_user_team when player is dead. This works: cs_set_user_team(id, CS_TEAM_CT) This does not: cs_set_user_team(id, (cs_get_user_team(id) == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T) I printed the value of cs_get_user_team and got: thrun_crash_future Then I ran it again and it printed: ngelevel_mapname get_players(players, playercount, "he", "T") Does also not seem to be working properly. Damn, I'm lost. For some reason I could use this: cs_set_user_team(id, (cs_get_user_team(id) == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T) in a function triggered by the Ham_Killed... |
Re: Can't teamswap dead players
What amxx compiler version are you using?
|
Re: Can't teamswap dead players
Quote:
|
Re: Can't teamswap dead players
That's why you've problems in your plugins because you're using an old compiler probably using compiler version 1.8.1
|
Re: Can't teamswap dead players
Quote:
I am using the map spawns editor, do you think it might affect my plugin? |
Re: Can't teamswap dead players
I tried this stupid solution but it crashed my server: :down:
I also tried calling the function from: register_logevent( "SwapAlivePlayers", 2, "1=Round_End" ); Instead of: register_event("SendAudio", "SwapAlivePlayers", "a", "2&%!MRAD_terwin") register_event("SendAudio", "SwapAlivePlayers", "a", "2&%!MRAD_ctwin") Still does not work so seems to be an issue with seting dead players. Can someone test on their system? :S PHP Code:
|
Re: Can't teamswap dead players
use the same amxx compiler version as your amxx mod in your server.
also use the latest amxx version which is 1.10 or 1.9 |
All times are GMT -4. The time now is 12:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.