מציג תוצאות 1 עד 3 מתוך 3

אשכול: פרסום|מצלמה זזה בבחירת שחקן

  1. #1
    o F i R o F i R מנותק משתמש חסום
    תאריך הצטרפות
    22/10/08
    שם פרטי
    אופיר
    הודעות
    3,853
    קיבל לייק
    0 פעמים

    פרסום|מצלמה זזה בבחירת שחקן

    לינק למקור:
    http://forum.sa-mp.com/index.php?topic=115765.0
    דוגמא:

    אם אין לכם מוד LARP או GF רק מוד רגיל תעתיקו את זה למעלה:
    PHP Code:
    //where the player will spawn
    #define player_x -250.9738
    #define player_y 2585.6497
    #define player_z 63.5703
    #define player_angle 210.3500

    //PLAYER CAMERA, THE ONE YOU CREATE SO YOU CAN SEE THE PLAYER
    //note: for a better effect, let the camera be a few meters away from the player
    #define camera_x -248.9410
    #define camera_y 2581.5327
    #define camera_z 64.9334

    //ATTENTION; THESE ARE MILISECONDS
    //untested, but it should work in theory. The smaller the value, the faster the camera.
    #define moving_speed 50

    //declaring stuff
    //IMPORTANT: FOR THE CODE TO WORK, YOU MUST DEFINE THE ENUM BEFORE PlayerInfo
    //just copy it like It's written here
    enum pInfo
    {
    bool:SpawnDance,
    Float:SpawnAngle,
    SpawnTimer
    };

    new 
    PlayerInfo[MAX_PLAYERS][pInfo]; 
    אבל אם יש לכם מוד ארפי תשימו כך:
    PHP Code:
    //where the player will spawn
    #define player_x -250.9738
    #define player_y 2585.6497
    #define player_z 63.5703
    #define player_angle 210.3500

    //PLAYER CAMERA, THE ONE YOU CREATE SO YOU CAN SEE THE PLAYER
    //note: for a better effect, let the camera be a few meters away from the player
    #define camera_x -248.9410
    #define camera_y 2581.5327
    #define camera_z 64.9334

    //ATTENTION; THESE ARE MILISECONDS
    //untested, but it should work in theory. The smaller the value, the faster the camera.
    #define moving_speed 50

    //declaring stuff
    //IMPORTANT: FOR THE CODE TO WORK, YOU MUST DEFINE THE ENUM BEFORE PlayerInfo
    //just copy it like It's written here 
    עכשיו תחפשו במוד PINFO מצאתם? רדו למטה לסוף הרשימה ותוסיפן את זה:
    PHP Code:
    enum pInfo
    {
    bool:SpawnDance,
    Float:SpawnAngle,
    SpawnTimer
    }; 
    וזהו עכשיו גם למי שיש מוד DM וגם ארפי לעקוב אחרי הדברים שאני מראה..
    לכו לפובליק
    PHP Code:
    public OnPlayerRequestClass(playeridclassid
    שם איפה שאתם רואים
    SetPlayerCameraPos
    וכל אלה תשמרו להם גיבוי אם אחרי זה לא תאהבו תמערכת ותמחקו את כל הקודים האלה שם..לא את כל הפאבליק!
    ואז שימו:
    PHP Code:
    SetPlayerPos(playeridplayer_x,player_y,player_z);
    SetPlayerFacingAngle(playeridplayer_angle);
    SetPlayerCameraPos(playeridcamera_x,camera_y,camera_z);
    SetPlayerCameraLookAt(playeridplayer_x,player_y,player_z);
    ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing. It's most fitting to the music
    PlayerPlaySound(playerid1097,-119.9460,23.1096,12.2238); //music, duh
    //making sure the timer gets executed only once, so the camera doesn't go to fast
    if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera"moving_speedtrue"i"playerid);
    PlayerInfo[playerid][SpawnDance] = false//preventing the timer to execute again[RIGHT][/RIGHT] 

    לכו לפאבליק
    PHP Code:
    public OnPlayerConnect(playerid
    ושימו שם את הקוד:
    PHP Code:
    PlayerInfo[playerid][SpawnDance] = true
    לכו לפאבליק
    PHP Code:
    public OnPlayerSpawn(playerid
    ושימו:
    PHP Code:
        PlayerInfo[playerid][SpawnAngle] = 0.0//so when you leave and another player comes, the camera will start from start
        
    PlayerInfo[playerid][SpawnDance] = true//to not execute to much timers
    KillTimerPlayerInfo[playerid][SpawnTimer] ); //to kill it, since its useless now
    PlayerPlaySound(playerid11860.00.00.0); // (blank sound) to shut the music up
            
    SetCameraBehindPlayer(playerid); //to prevent some bugs 
    לכו לפאפבליק
    PHP Code:
    public OnPlayerDisconnect(playeridreason
    הוסיפו לו את הקוד:
    PHP Code:
        KillTimerPlayerInfo[playerid][SpawnTimer] ); 
    הכי למטה במוד:
    PHP Code:
    //The business part of the code
    forward MoveCamera(playerid);
    public 
    MoveCamera(playerid)
    {
    //this is called trigonometry. It makes the camera spin
    //you can experiment with this line. Just change the values 2, 10 and 3 to make different effects
        
    SetPlayerCameraPos(playeridplayer_x floatsin(-PlayerInfo[playerid][SpawnAngle], degrees), player_y 10 floatcos(-PlayerInfo[playerid][SpawnAngle], degrees), player_z 3);
        
    SetPlayerCameraLookAt(playeridplayer_xplayer_yplayer_z 0.5);
        
    //changing the angle a little
        
    PlayerInfo[playerid][SpawnAngle] += 0.5;

        if (
    PlayerInfo[playerid][SpawnAngle] >= 360.0)
            
    PlayerInfo[playerid][SpawnAngle] = 0.0;


    וזהו תהנו! קרדיט לסאמפ העולמי

  2. #2
    הסמל האישי של Boss
    Boss Boss מנותק ותיק
    תאריך הצטרפות
    10/07/07
    שם פרטי
    אדי ツ
    הודעות
    1,423
    קיבל לייק
    0 פעמים
    WTF חזק אחי

  3. #3
    LonleyGangster LonleyGangster מנותק גורו
    תאריך הצטרפות
    20/06/08
    שם פרטי
    זוהר :P
    הודעות
    2,350
    קיבל לייק
    0 פעמים
    ווואי סוס אחי.

נושאים דומים

  1. פרסום שחקן סוס ותחון במייפל
    על ידי -lidoR בפורום Maple Story
    תגובות: 16
    הודעה אחרונה: 02/06/09, 16:40
  2. פרסום| מערכת CamHack - מצלמה מעופפת
    על ידי KipoD בפורום Pawno & Scripting
    תגובות: 10
    הודעה אחרונה: 26/03/09, 21:40
  3. תגובות: 25
    הודעה אחרונה: 05/03/09, 20:34
  4. פירסום| מידע שיעזור לכם בבחירת שחקן
    על ידי SiSo בפורום Silkroad Online
    תגובות: 0
    הודעה אחרונה: 23/12/07, 15:29
  5. שחקן השנה של פיפא: רונאלדיניו
    על ידי BigiD בפורום פח זבל
    תגובות: 7
    הודעה אחרונה: 21/12/04, 15:49
eXTReMe Tracker