09.11.2012, 10:46
(
Последний раз редактировалось Konstantinos; 10.11.2012 в 10:31.
)
First of all, the language is PAWN, the "pawno" is the compiler.
Also, the lenght is optional and it is not needed to use it. For example in the "/location" the lenght is 9, not 10.
You can read a lot of stuff on the Wiki Samp and read about Format and Floats
Also, the lenght is optional and it is not needed to use it. For example in the "/location" the lenght is 9, not 10.
You can read a lot of stuff on the Wiki Samp and read about Format and Floats
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/location", true))
{
new
Float:Pos[3],
string[41]
;
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
format(string, sizeof(string), "X: %.4f, Y: %.4f, Z: %.4f", Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}
// Rest of commands
return 0;
}