Szerző Téma: Ratio problema!!!  (Megtekintve 998 alkalommal)

Ratio problema!!!
« Dátum: 2013. Január 24. - 08:56:47 »
0 Show voters
Nem reg Virgonc segitett nekem ratiot csinalni, ami mukodik is, viszont hoston ha id 1 megoldi id 0 akkor nem az jelenik meg hogy \"0.00\" hanem //{} ilyesmik. Amugy ha Olesek, Halalok 1-1 lesz akkor mar jo de addig nem.
HELP!!

Ratio problema!!!
« Válasz #1 Dátum: 2013. Január 24. - 09:33:18 »
0 Show voters
Nem tudom, hogy PVar-ral vagy pInfo -val csináltad, én PVarral megírom neked, majd írd át az alábbi részt ha nem PVaros! A kódot majd a timerhez tedd legelõlre.
Tehát ezt írd át ha nem PVar: GetPVarInt(playerid, \"Deaths\")
És itt a kód:

if(GetPVarInt(playerid, \"Deaths\") == 0) Ratio = 0;

Ratio problema!!!
« Válasz #2 Dátum: 2013. Január 24. - 10:22:50 »
0 Show voters
Egyik sincs a modban.  :confused:

Ratio problema!!!
« Válasz #3 Dátum: 2013. Január 24. - 10:40:21 »
0 Show voters
timer alattit masold mar be ok?

Ratio problema!!!
« Válasz #4 Dátum: 2013. Január 24. - 11:05:47 »
0 Show voters
for(new i; i < GetMaxPlayers(); i++)
{
SetTimerEx(\"textdrawratio\", 1000, true, \"i\", i);
ratio = TextDrawCreate(8.000000, 430.000000, \"\");
TextDrawBackgroundColor(ratio, -1);
TextDrawFont(ratio, 1);
TextDrawLetterSize(ratio, 0.280000, 1.200000);
TextDrawColor(ratio, 65535);
TextDrawSetOutline(ratio, 0);
TextDrawSetProportional(ratio, 1);
TextDrawSetShadow(ratio, 0);
}

Ratio problema!!!
« Válasz #5 Dátum: 2013. Január 24. - 11:09:55 »
0 Show voters
Azt másold be, ami a \"Testdrawratio\" time alatt van. :)
public textdrawratio, stb.

Ratio problema!!!
« Válasz #6 Dátum: 2013. Január 24. - 11:12:14 »
0 Show voters
public textdrawratio(playerid)
{
    new tstring[256];
     new Float:ratdio=floatdiv(kills[playerid],deaths[playerid]);
    format(tstring,sizeof(tstring),\"Oles: %d Halal: %d Ratio: %.2f\",kills[playerid],deaths[playerid],ratdio);
    TextDrawSetString(ratio[playerid],tstring);
return 1;
}

Ratio problema!!!
« Válasz #7 Dátum: 2013. Január 24. - 12:03:50 »
+1 Show voters
Idézetet írta: idokepp date=1359022334\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"32893\" data-ipsquote-contentclass=\"forums_Topic

public textdrawratio(playerid)
{
    new tstring[256];
     new Float:ratdio=floatdiv(kills[playerid],deaths[playerid]);
if(deaths[playerid] == 0) ratdio = 0;
    format(tstring,sizeof(tstring),\"Oles: %d Halal: %d Ratio: %.2f\",kills[playerid],deaths[playerid],ratdio);
    TextDrawSetString(ratio[playerid],tstring);
return 1;
}

 


Ratio problema!!!
« Válasz #8 Dátum: 2013. Január 24. - 12:12:10 »
0 Show voters
Koszi amint lesz idom tesztelem! Ha nem mukodik majd irok!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal