Ocencie ktora funkcja lepsza :
Numer 1.:
public armor(id)
{
if(is_user_alive(id))
{
new team = get_user_team(id)
switch (team)
{
case TEAM_T:
{
client_print(id, print_chat, "Komenda dostepna tylko dla CT")
}
case TEAM_CT:
{
client_cmd(id, "chooseteam;menuselect 1;menuselect 9;menuselect 2")
client_print(id, print_chat, "Kupiles kamizelke")
}
}
}
client_print(id, print_chat, "Komenda dostepna tylko dla zyjacych graczy")
}Czy numer 2. :
public armor(id)
{
if(is_user_alive(id)) || (get_user_team(id) == TEAM_CT)
{
client_cmd(id, "xxxxxxxxxxxxxxxxxxxxxx")
}
if(!is_user_alive(id))
{
client_print(id, print_chat, "Komenda dostepna tylko dla zywych graczy")
}
if(get_user_team(id) == TEAM_T)
{
client_print(id, print_chat, "Komenda dostepna tylko dla CT")
}
}Ktora jest bardziej optymalna itd, mowcie
Przy okazji poprawcie jesli cos jest zle
Użytkownik Najkon edytował ten post 19.11.2011 19:44


Dodatki SourceMod












