Jump to content

[O comanda utila ] Save Camera


Recommended Posts

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 by #Yudin
  • Like 1
  • Thanks 1
[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to post
Share on other sites
Acum 30 minute, jesusiseu a spus:

destul de folositoare, multumim.

Cu placere?

[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to post
Share on other sites
  • 1 year later...
Acum 1 oră, CraZZyKiLl3R a spus:

Multam, Chiar imi trebuia ceva de genu.

 

Cu mare drag! :)

[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.