Raised This Month: $ Target: $400
 0% 

Some newbe questions on mm coding


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Carolus
Member
Join Date: Jun 2010
Old 07-21-2010 , 08:34   Some newbe questions on mm coding
Reply With Quote #1

Hi,

I'm trying to move from sm to mm, but there are some things that I just have
no clue how to do.

Can you help me translate these snippets to C++/MM ?

(my trouble is mostly to mimic some of the stock SM functions)

Code:
PrintToChat(index,"%s :D","hello world");
Code:
PlayerCashOffset = FindSendPropOffs("CCSPlayer","m_iAccount");      
if (PlayerCashOffset == -1)
{
   cash = GetEntData(index, PlayerCashOffset);
}
Code:
    new maxclients = GetMaxClients();
    decl teams[maxclients];
    for(new j=1; j <= maxclients; j++)
    {
        if (IsClientConnected(j) && IsClientInGame(j) && !IsFakeClient(j))
        {
            if (GetClientTeam(j) == TEAM_CTS)
            {
                teams[j] = TEAM_CTS;
            } else {
                teams[j] = TEAM_TS;
            }
        }        
    }        
    for(new j=1; j <= maxclients; j++)
    {
        if (IsClientConnected(j) && IsClientInGame(j) && !IsFakeClient(j))
        {
            if (teams[j] == TEAM_CTS)
            {
                ChangeClientTeam(j, TEAM_TS);
            } else {
                ChangeClientTeam(j, TEAM_CTS);
            }
        }        
    }
Thanks a lot for your time and help!


oops wrong forum, can someone move my thread? thanks!
__________________
Carolus is offline
 



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 06:53.


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