Diggit dots - 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: Diggit dots (
/showthread.php?tid=252878)
Diggit dots -
The_Tough - 03.05.2011
Код:
dcmd_myangle(playerid,params[]) {
#pragma unused params
new Float:angle,string[26];
new ang = GetPlayerFacingAngle(playerid,angle);
format(string,sizeof(string),"[ ! ] Angle : %d",angle);
SendClientMessage(playerid,COLOUR_GREEN,string);
print(string);
}
}
How can I seperate the numbers of the angle because when I type the cmd i get like "angle ; 123223231
I mean I want it to get 1232.21232
Re: Diggit dots -
Joe Staff - 03.05.2011
pawn Код:
dcmd_myangle(playerid,params[])
{
#pragma unused params
new Float:angle,string[26];
GetPlayerFacingAngle(playerid,angle);
format(string,sizeof(string),"[ ! ] Angle : %f",angle);
SendClientMessage(playerid,COLOUR_GREEN,string);
print(string);
}
Your variable 'ang' was useless
You use %f to format a float