SA-MP Forums Archive
Can Somebody tell me what are those mean? - 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)
+--- Thread: Can Somebody tell me what are those mean? (/showthread.php?tid=493104)



Can Somebody tell me what are those mean? - AnonScripter - 07.02.2014

pawn Код:
#define SendFormattedText(%1,%2,%3,%4) do{ new string[128]; format(string,sizeof(string),(%3),%4); SendClientMessage((%1),(%2),string); }while(FALSE)
pawn Код:
new Float:Dis = floatsqroot(floatpower(floatabs(floatsub(OldCoordsX[i],x)),2) + floatpower(floatabs(floatsub(OldCoordsY[i],y)),2));



Re: Can Somebody tell me what are those mean? - BullseyeHawk - 07.02.2014

The first one is a quick formatted message, it's the same as:
pawn Код:
new string[128];
format(string, sizeof(string), "hello %d!", playerid);
SendClientMessage(playerid, -1, string);
The second one is a calculated distance, it creates a little equation that gives you the distance from points.
In the method you've showed us, it calculates the distance between a 2D space, OldCoordsX[i], x and OldCoordsY[i], y.