little bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: little bug (
/showthread.php?tid=200034)
little bug -
Seven. - 17.12.2010
Well, when i get killed it will say:
You have been killed by Name(id: x) '103427473 Meters'.
instead of normal meters etc. xd
pawn Код:
stock Float:GetPlayerDistanceToPoint2(playerid, {Float,_}:...)
{
new num = numargs(), Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(num == 3) return floatsqroot(floatpower(floatabs(floatsub(pos[0], Float:getarg(1))), 2) + floatpower(floatabs(floatsub(pos[1], Float:getarg(2))), 2));
else if(num == 4) return floatsqroot(floatpower(floatabs(floatsub(pos[0], Float:getarg(1))), 2) + floatpower(floatabs(floatsub(pos[1], Float:getarg(2))), 2) + floatpower(floatabs(floatsub(pos[2], Float:getarg(3))), 2));
return -1.0;
}
///////////////
format(KillString,sizeof(KillString),"You have been killed by: {FF0CC0}%s(id: %d){FFFFFF} from {FFC00C}'%d {FFFFFF}Meters{FFC00C}'{FFFFFF}.",gPlayer[killerid][gName],killerid,GetPlayerDistanceToPoint2(playerid,x,y,z));
Re: little bug -
Seven. - 17.12.2010
Bump, hope that somebody can help me :S
Re: little bug -
blackwave - 17.12.2010
pawn Код:
format(KillString,sizeof(KillString),"You have been killed by: {FF0CC0}%s(id: %d){FFFFFF} from {FFC00C}'%f {FFFFFF}Meters{FFC00C}'{FFFFFF}.",gPlayer[killerid][gName],killerid,GetPlayerDistanceToPoint2(playerid,x,y,z));