Quote:
Originally Posted by allenwr
and americans british and allies are all the same team... just different names... now if you have a better name to call each of the team, please tell me...
|
i mean something like this:
yours:
Code:
new team[8]
dod_get_pl_teamname(id, team,7)
if(equali(team,"allies")) {
dod_set_model(id, "us-inf")
}
else if(equali(team,"axis")) {
dod_set_model(id, "axis-inf")
}
could be:
Code:
new team = get_user_team(id)
switch(team)
{
//Allies
case 1: {
new is_brit = dod_get_map_info(MI_ALLIES_TEAM)
switch(is_brit)
{
//American
case 0: {
new is_para = dod_get_map_info(MI_ALLIES_PARAS)
switch(is_para)
{
//Not Para
case 0: dod_set_model(id, "us-inf")
//Is Para
case 1: dod_set_model(id, "us-para")
}
}
//british
case 1: dod_set_model(id, "brit-inf")
}
}
//Axis
case 2: {
new is_para = dod_get_map_info(MI_AXIS_PARAS)
switch(is_para)
{
//Not Para
case 0: dod_set_model(id, "axis-inf")
//Is Para
case 1: dod_set_model(id, "axis-para")
}
}
}
which will detect if its axis, american, or british.. and if axis or american.. it checks for para.. so that the right models get set
__________________