SA-MP Forums Archive
First Person driving removal - 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: First Person driving removal (/showthread.php?tid=553490)



First Person driving removal - Kenzix - 30.12.2014

Hello Script experts..

So.. I've downloaded the UG:RP gamemode, and trying to edit it and get the feeling of scripting, but i cant figure out where to look and what to remove to get that shitty FP-Driving away.. i've tried to search on "SetCameraBehindPlayer" and cut some pieces out but no luck..

I asume people allready knows the code, but i can post if needed..

Thanks!


Re: First Person driving removal - Write - 30.12.2014

I don't know the code.


Re: First Person driving removal - Kenzix - 30.12.2014

I've uploaded here as a txt file.


Re: First Person driving removal - Kenzix - 30.12.2014

is it allowed to /bump?


Re: First Person driving removal - Dignity - 30.12.2014

Look for AttachCameraToObject and remove it. Also, I just read over the code and I'm curious as to why you'd use a script like that. It's using two different saving systems and uses incredibly outdated scripting methods (strtok for example).


Re: First Person driving removal - Facerafter - 30.12.2014

Yes it i but only after 24 hours I believe.


If im right its this piece of code.
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
    {
        if(GetPVarInt(playerid,"used") == 0)
        {
            new p = GetPlayerVehicleID(playerid);
            pObj[playerid] = CreatePlayerObject(playerid,19300, 0.0000, -1282.9984, 10.1493, 0.0000, -1, -1, 100);
            AttachPlayerObjectToVehicle(playerid,pObj[playerid],p,-0.314999, -0.195000, 0.510000, 0.000000, 0.000000, 0.000000);
            AttachCameraToPlayerObject(playerid,pObj[playerid]);
            SetPVarInt(playerid,"used",1);
        }
    }
    else if(GetPVarInt(playerid,"used") == 1)
    {
        SetCameraBehindPlayer(playerid);
        DestroyPlayerObject(playerid,pObj[playerid]);
        SetPVarInt(playerid,"used",0);
    }



Re: First Person driving removal - Kenzix - 30.12.2014

Thank you Facerafter, you were right!

/Resolved