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!
__________________