Raised This Month: $ Target: $400
 0% 

Detecting team change, tag mismatch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-14-2020 , 12:46   Re: Detecting team change, tag mismatch
Reply With Quote #13

My code looks like this:

PHP Code:
public logevent_round_end(id)
{
    if (
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
g_PreTeam[id] = cs_get_user_team(id);
    }

logevent_dound_end there is no "id" parameter, so you need to use get_players and loop all players and then use the id

PHP Code:
public OnPlayerSpawn(id)
{
    if (
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
g_PostTeam[id] = cs_get_user_team(id)
        
set_task(0.5"CheckModel"id);
    }


public 
CheckModel(id)
{
    if(
g_PostTeam == g_PreTeam)
    {
        
CC_SendMessage(id"!n>> !gYour model was set, no need for change!");
    }
    else if(
g_PostTeam != g_PreTeam)
    {
        
cs_reset_user_model(id)
        
CC_SendMessage(id"!n>> !gModel reset applied, change your model!");
    }



PHP Code:
if(g_PostTeam[id] == g_PreTeam[id])

else if(
g_PostTeam[id] != g_PreTeam[id]) 
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 06-14-2020 at 12:47.
iceeedr is offline
Send a message via Skype™ to iceeedr
 



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 17:12.


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