Sziasztok! Frissítettem a szerverem 0.3d rõl z-re, viszont nem mûködik néhány kód! Ezt hogyan lehet orvosolni?
Itt vannak amik z-ben már nem mûködnek:
Ez az M4 gránát, ez nem hibás, csak nem történik semmi:
{
GrenadeReload[playerid] = 0;
SetTimerEx(\"ReloadGrenade\",3*1000,false,\"i\",playerid);
new Float:nadex, Float:nadey, Float:nadez, Float:angle;
GetPosFromView(playerid, Distance, nadex, nadey, nadez);
GetPlayerFacingAngle(playerid, angle);
CreateExplosion(nadex,nadey,nadez, 0, 1.0);
}
Ez az idõ, ezzel az a gond, hogy nem sötétedik a játékban:
public settime(playerid)
{
new string[256],year,month,day,hours,minutes,seconds;
getdate(year, month, day), gettime(hours, minutes, seconds);
format(string, sizeof string, \"%d/%s%d/%s%d\", day, ((month < 10) ? (\"0\") : (\"\")), month, (year < 10) ? (\"0\") : (\"\"), year);
TextDrawSetString(Date, string);
format(string, sizeof string, \"%s%d:%s%d:%s%d\", (hours < 10) ? (\"0\") : (\"\"), hours, (minutes < 10) ? (\"0\") : (\"\"), minutes, (seconds < 10) ? (\"0\") : (\"\"), seconds);
TextDrawSetString(Time, string);
}
Köszönöm szépen a segítséget elõre is!
Az idõ régebbi verzióban sem szabadott volna mûködnie. Lekéred az idõt, változtatod a textdrawot, de SetPlayerTime sehol..
Szerintem egy gl_realtime be volt töltve neki :D
1. ezt tedd bele a scriptbe:
stock GetPosFromView(playerid, Float:distance, &Float:x, &Float:y, &Float:z)
{
new Float:cx,Float:cy,Float:cz,Float:fx,Float:fy,Float:fz;
GetPlayerCameraPos(playerid, cx, cy, cz);
GetPlayerCameraFrontVector(playerid, fx, fy, fz);
x = fx * distance + cx;
y = fy * distance + cy;
z = fz * distance + cz;
}
Amúgy http://pastebin.com/42YirMG1
2. Töltsd be a gl_realtime includeot
[mod]Összefûztem a dupla hozzászólást.[/mod]