khain.dev Posted May 12, 2019 Report Share Posted May 12, 2019 (edited) Buna! Probabil ca fiecare a intilnit problema cu salvarea coordonatelor a camerei,pai uite ca datorita acestei comenzi,usor si repede salvati coordonatele. - Cum lucreaza comanda? - Usor, intri pe server,te apropii in locul unde doresti ca exemplu sa apara jucatorul pentru a alege skinul,scrii comanda /scamera si coordonatele se salveaza in scriptfiles. CMD:scamera(playerid, params[]) { static const fmt_str0[] = "SetPlayerCameraPos(playerid, %f, %f, %f);\n", fmt_str1[] = "SetPlayerCameraLookAt(playerid, %f, %f, %f);\n"; const fmt_size0 = sizeof(fmt_str0) + (-2 + 11) * 3, fmt_size1 = sizeof(fmt_str1) + (-2 + 11) * 3; #if fmt_size0 > fmt_size1 #define final_size fmt_size0 #else #define final_size fmt_size1 #endif new str[final_size], File: cam_file = fopen("coordonate.ini", io_append), Float: cam_pos_axis_x, Float: cam_pos_axis_y, Float: cam_pos_axis_z, Float: cam_pos_vec_axis_x, Float: cam_pos_vec_axis_y, Float: cam_pos_vec_axis_z; #undef final_size GetPlayerCameraPos(playerid, cam_pos_axis_x, cam_pos_axis_y, cam_pos_axis_z); GetPlayerCameraFrontVector(playerid, cam_pos_vec_axis_x, cam_pos_vec_axis_y, cam_pos_vec_axis_z); format(str, sizeof(str), fmt_str0, cam_pos_axis_x, cam_pos_axis_y, cam_pos_axis_z); fwrite(cam_file, str); format(str, sizeof(str), fmt_str1, cam_pos_axis_x + 5.0 * cam_pos_vec_axis_x, cam_pos_axis_y + 5.0 * cam_pos_vec_axis_y, cam_pos_axis_z + 5.0 * cam_pos_vec_axis_z); fwrite(cam_file, str); return fclose(cam_file); } Va multumesc,si sper ca va fi de folos! Edited May 12, 2019 by #Yudin 1 1 Quote Link to comment Share on other sites More sharing options...
jesusiseu Posted May 12, 2019 Report Share Posted May 12, 2019 destul de folositoare, multumim. Quote Link to comment Share on other sites More sharing options...
khain.dev Posted May 12, 2019 Author Report Share Posted May 12, 2019 Acum 30 minute, jesusiseu a spus: destul de folositoare, multumim. Cu placere Quote Link to comment Share on other sites More sharing options...
IonutRLS Posted December 6, 2020 Report Share Posted December 6, 2020 Multam, Chiar imi trebuia ceva de genu. 1 Quote Link to comment Share on other sites More sharing options...
khain.dev Posted December 6, 2020 Author Report Share Posted December 6, 2020 Acum 1 oră, CraZZyKiLl3R a spus: Multam, Chiar imi trebuia ceva de genu. Cu mare drag! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.