Chciałem przerobić to: http://amxx.pl/topic...post__p__280087 pod Diablo.
Zmieniłem na to:
public przyznanie_doswiadczenia()
{
new players[32], num;
get_players(players, num, "h");
new tempfrags, id;
new swapfrags, swapid;
new starfrags[3];
new starid[3];
for (new i = 0; i < num; i++)
{
id = players[i];
tempfrags = get_user_frags(id);
if ( tempfrags > starfrags[0] )
{
starfrags[0] = tempfrags;
starid[0] = id;
Give_Xp(id, get_cvar_num("exp_3miejsce"));
if ( tempfrags > starfrags[1] )
{
swapfrags = starfrags[1];
swapid = starid[1];
starfrags[1] = tempfrags;
starid[1] = id;
starfrags[0] = swapfrags;
starid[0] = swapid;
Give_Xp(id, get_cvar_num("exp_2miejsce"));
if ( tempfrags > starfrags[2] )
{
swapfrags = starfrags[2];
swapid = starid[2];
starfrags[2] = tempfrags;
starid[2] = id;
starfrags[1] = swapfrags;
starid[1] = swapid;
Give_Xp(id, get_cvar_num("exp_1miejsce"));
}
}
}
}
new name[32];
new winner = starid[2];
if ( !winner )
return;
ColorChat(id, GREEN, "Najlepsi gracze na tej mapie:");
get_user_name(starid[2], name, charsmax(name));
ColorChat(id, GREEN, "1. %s - %i Fragow (+%d dosw.)", name, starfrags[2], exp_1miejsce[id])
get_user_name(starid[1], name, charsmax(name));
ColorChat(id, GREEN, "2. %s - %i Fragow (+%d dosw.)", name, starfrags[1], exp_2miejsce[id])
get_user_name(starid[0], name, charsmax(name));
ColorChat(id, GREEN, "3. %s - %i Fragow (+%d dosw.)", name, starfrags[0], exp_3miejsce[id])
}
Wszystko dobrze się kompiluje, ale nie rozdaje doświadczenia i nie ma info pod koniec mapy, co jest źle ?