SA-MP Forums Archive
Help with first person view! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with first person view! (/showthread.php?tid=447084)



Help with first person view! - Lops - 28.06.2013

pawn Код:
CMD:fps(playerid,params[])
        {
            if(GetPVarInt(playerid,"used") == 0)
            {
                firstperson[playerid] = CreateObject(19300, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
        AttachObjectToPlayer(firstperson[playerid],playerid, 0.0, 0.12, 0.7, 0.0, 0.0, 0.0);
            AttachCameraToObject(playerid, firstperson[playerid]);
            SetPVarInt(playerid,"used",1);
        }
    else if(GetPVarInt(playerid,"used") == 1)
    {
          SetCameraBehindPlayer(playerid);
          DestroyObject(firstperson[playerid]);
          SetPVarInt(playerid,"used",0);
    }
         return 1;
    }
Problem is, that when i tip IG /fps, then the first person look activated and work on me.
Then, if someone else tip /fps at the time, when i use the fps, then servers says, that "Server does not have the command" or sth like that.
Shorter, if i use /fps, the others can't use this command.
Someone knows problem?


Re: Help with first person view! - Lops - 29.06.2013

Yes, other commands works.

It works, when only one person use it. When other person do /fps at same time as i use the command, then it not works on the other person. Only works on one person.


Re: Help with first person view! - Lops - 01.07.2013

I need help fast.
Maybe someone knows problem?


Re: Help with first person view! - Lops - 06.07.2013

Can someone help maybe?


Re: Help with first person view! - introzen - 06.07.2013

Try CreatePlayerObject instead. Not that it should matter but...

Also show us the "firstperson" array.


Re: Help with first person view! - Lops - 06.07.2013

pawn Код:
new firstperson[MAX_PLAYERS];