daj kod skilltree to ci zrobie
Dodano 25 marzec 2011 - 17:33:podmień sobie tą funkcję:
public skill_menu(id, key)
{
new max_int=4000
new max_str=6000
new max_dex=3000
new max_zwi=2000
switch(key)
{
case 0:
{
if (player_intelligence[id]<max_int){
player_point[id]-=2
player_intelligence[id]+=1
}
else client_print(id,print_center,"Maxymalny poziom inteligencji osiagniety")
}
case 1:
{
if (player_strength[id]<max_str){
player_point[id]-=2
player_strength[id]+=1
}
else client_print(id,print_center,"Maxymalny poziom sily osiagniety")
}
case 2:
{
if (player_agility[id]<max_dex){
player_point[id]-=2
player_agility[id]+=1
player_damreduction[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(player_agility[id])))/100)
}
else client_print(id,print_center,"Maxymalny poziom zrecznosci osiagniety")
}
case 3:
{
if (player_dextery[id]<max_zwi){
player_point[id]-=2
player_dextery[id]+=1
set_speedchange(id)
}
else client_print(id,print_center,"Maxymalny poziom zwinnosci osiagniety")
}
case 4:
{
if (player_point[id]+player_intelligence[id] <= max_int)
{
player_intelligence[id]+=player_point[id]
player_point[id]=0
}
else
{
player_point[id]-=max_int-player_intelligence[id]
player_intelligence[id]=max_int
client_print(id,print_center,"Maxymalny poziom inteligencji osiagniety")
}
}
case 5:
{
if (player_point[id]+player_strength[id] <= max_str)
{
player_strength[id]+=player_point[id]
player_point[id]=0
}
else
{
player_point[id]-=max_str-player_strength[id]
player_strength[id]=max_str
client_print(id,print_center,"Maxymalny poziom sily osiagniety")
}
}
case 6:
{
if (player_point[id]+player_agility[id]<=max_dex)
{
player_agility[id]+=player_point[id]
player_point[id]=0
}
else
{
player_point[id]-=max_dex-player_agility[id]
player_agility[id]=max_dex
client_print(id,print_center,"Maxymalny poziom zrecznosci osiagniety")
}
player_damreduction[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(player_agility[id])))/100)
}
case 7:
{
if (player_point[id]+player_dextery[id]<max_zwi)
{
player_dextery[id]+=player_point[id]
player_point[id]=0
}
else
{
player_point[id]-=max_zwi-player_dextery[id]
player_dextery[id]=max_zwi
client_print(id,print_center,"Maxymalny poziom zwinnosci osiagniety")
}
set_speedchange(id)
}
}
if (player_point[id] > 0)
skilltree(id)
return PLUGIN_HANDLED
}