AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fakemeta Team and Model (https://forums.alliedmods.net/showthread.php?t=60659)

fxfighter 09-09-2007 10:02

Fakemeta Team and Model
 
I need help to be able to change Board and model whit fakemeta.
i only want to change score board and the model not the actuly team.

THis dont work whit scoreboard-.- dont know why.
Code:


public SetTeam(id)
{
    message_begin(MSG_ALL, get_user_msgid("TeamInfo"), {0,0,0}, 0)
    write_byte(id)
    write_string("CT")
    message_end()
}

i dont want the cstrike module on for just 2 things so plz
fakemeta help only.

ConnorMcLeod 09-09-2007 10:26

Re: Fakemeta Team and Model
 
From amx2006.3 cstrike include :

Code:

// Sets user team.
// params[1] = user index
// params[2] = team
// params[3] = model = 0
stock cs_set_user_team(id, {CsTeams,_}:team, {CsInternalModel,_}:model = CS_DONTCHANGE)
{
  if(cs_check_player(id, "cs_set_user_team")) return 0

  switch(team)
  {
    case CS_TEAM_T: set_offset_int(id, OFFSET_TEAM, 1)
    case CS_TEAM_CT: set_offset_int(id, OFFSET_TEAM, 2)
    case CS_TEAM_SPECTATOR: set_offset_int(id, OFFSET_TEAM, 3)
  }
  switch(model)
  {
    case CS_CT_URBAN: {
      set_user_model(id, "urban")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 1)
    }
    case CS_T_TERROR: {
      set_user_model(id, "terror")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 2)
    }
    case CS_T_LEET: {
      set_user_model(id, "leet")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 3)
    }
    case CS_T_ARCTIC: {
      set_user_model(id, "arctic")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 4)
    }
    case CS_CT_GSG9: {
      set_user_model(id, "gsg9")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 5)
    }
    case CS_CT_GIGN: {
      set_user_model(id, "gign")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 6)
    }
    case CS_CT_SAS: {
      set_user_model(id, "sas")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 7)
    }
    case CS_T_GUERILLA: {
      set_user_model(id, "guerilla")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 8)
    }
    case CS_CT_VIP: {
      set_user_model(id, "vip")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 9)
    }
    case CZ_T_MILITIA: {
      set_user_model(id, "militia")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 10)
    }
    case CZ_CT_SPETSNAZ: {
      set_user_model(id, "spetsnaz")
      set_offset_int(id, OFFSET_INTERNAL_MODEL, 11)
    }
  }

  new teaminfo[32]
  switch(team)
  {
    case CS_TEAM_UNASSIGNED: {
      copy(teaminfo, 31, "UNASSIGNED")
    }
    case CS_TEAM_T: {
      copy(teaminfo, 31, "TERRORIST")
    }
    case CS_TEAM_CT: {
      copy(teaminfo, 31, "CT")
    }
    case CS_TEAM_SPECTATOR: {
      copy(teaminfo, 31, "SPECTATOR")
    }
  }
  message_begin(MSG_ALL, get_user_msgid("TeamInfo"))
  write_byte(id)
  write_string(teaminfo)
  message_end()
  return 1
}


toazron1 09-09-2007 11:01

Re: Fakemeta Team and Model
 
in some cases the teaminfo is fired several times, it could be that its overwriting when you sent


All times are GMT -4. The time now is 16:13.

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