Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=========================== 1st Person Vehicle Driving By rati555 || V0.2 ===========================//
- #include <a_samp>
- #include <zcmd>
- #define FILTERSCRIPT
- new obj[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print(" 1st Person Vehicle Driving by Rati555");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid,vehicleid)
- {
- if(GetPVarInt(playerid,"used") == 1)
- {
- SetPVarInt(playerid,"used",0);
- SetCameraBehindPlayer(playerid);
- DestroyPlayerObject(playerid,obj[playerid]);
- }
- return 1;
- }
- CMD:changeview(playerid,params[])
- {
- #pragma unused params
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"You must be in a vehicle to use this cmd");
- if(GetPVarInt(playerid,"used") == 0)
- {
- new p = GetPlayerVehicleID(playerid);
- obj[playerid] = CreatePlayerObject(playerid,19300, 0.0000, -1282.9984, 10.1493, 0.0000, -1, -1, 100);
- AttachPlayerObjectToVehicle(playerid,obj[playerid],p,-0.314999, -0.195000, 0.510000, 0.000000, 0.000000, 0.000000);
- AttachCameraToPlayerObject(playerid,obj[playerid]);
- SetPVarInt(playerid,"used",1);
- }
- else if(GetPVarInt(playerid,"used") == 1)
- {
- SetCameraBehindPlayer(playerid);
- DestroyPlayerObject(playerid,obj[playerid]);
- SetPVarInt(playerid,"used",0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement