смарите чё я накалякал #include a_samp
#define COLOR_YELLOW 0xFFFF00AA
#pragma tabsize 0
forward Shagi(playerid);forward Shagi1(playerid);new Shaglog;new string[256];new shagi;
public Shagi(playerid){new Float:pos[4], filemode:openmethod = io_append, File:file;
if(IsPlayerInAnyVehicle(playerid)){new vehid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehid,pos[0],pos[1],pos[2]);GetVehicleZAngle(vehid,pos[3]);
format(string,100,"\n(%f,%f,%f,%f);",pos[0],pos[1],pos[2],pos[3]);} else {
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);GetPlayerFacingAngle(playerid,pos[3]);
format(string,100,"\n(%f,%f,%f,%f);",pos[0],pos[1],pos[2],pos[3]);}
if(!fexist("shag.txt")) openmethod = io_write;if((file = fopen("shag.txt",openmethod))){
fwrite(file,string);fclose(file);}return 1;}public OnPlayerCommandText(playerid, cmdtext[]){
if (strcmp(cmdtext, "/shagon", true)==0){if(Shaglog == 0){Shaglog = 1;shagi = SetTimer("Shagi",1000,1);
SendClientMessage(playerid,COLOR_YELLOW,"Система замоминания пути включена!");}else{
SendClientMessage(playerid,COLOR_YELLOW,"С.З.П. уже включена!!");}return 1;}
if (strcmp(cmdtext, "/shagoff", true)==0){if(Shaglog == 1){Shaglog = 0;KillTimer(shagi);
SendClientMessage(playerid,COLOR_YELLOW,"С.З.П. выключена!");}else{
SendClientMessage(playerid,COLOR_YELLOW,"С.З.П. уже выключена!");}return 1;}return 0;}