Advertisement
Guest User

Simple First Person Filterscript

a guest
Nov 24th, 2013
2,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.32 KB | None | 0 0
  1. //=====================================================//
  2. //************This filterscript was made by************//
  3. //*********************Tomix&Voxel*********************//
  4. //**************Do not remove the credits**************//
  5. //=====================================================//
  6.  
  7. //* * * * INCLUDES * * * *//
  8. #include <a_samp>
  9. #include <zcmd>
  10. //* * * *DEFINES* * * *//
  11. #define COL_GR          "{37DB45}"
  12. //* * * *VARIABLES* * * *//
  13. new FPS[MAX_PLAYERS];
  14. //* * * *EMUMS* * * *//
  15. enum pInformation
  16. {
  17.     FirstPS,
  18. };
  19.  
  20. new pInfo[MAX_PLAYERS][pInformation];
  21.  
  22. //* * * *COMMAND* * * *//
  23. CMD:fps(playerid)
  24. {
  25.     if(pInfo[playerid][FirstPS] == 0)
  26.     {
  27.         FPS[playerid] = CreateObject(19300, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  28.         AttachObjectToPlayer(FPS[playerid],playerid, 0.0, 0.12, 0.7, 0.0, 0.0, 0.0);
  29.         AttachCameraToObject(playerid, FPS[playerid]);
  30.         SendClientMessage(playerid,-1,""COL_GR"You are not in first person mode type /fps to disable first person mode!");
  31.         pInfo[playerid][FirstPS] = 1;
  32.     }
  33.     else if(pInfo[playerid][FirstPS] == 1)
  34.     {
  35.         SetCameraBehindPlayer(playerid);
  36.         DestroyObject(FPS[playerid]);
  37.         SendClientMessage(playerid,-1,""COL_GR"You have disabled first person mode!");
  38.         pInfo[playerid][FirstPS] = 0;
  39.     }
  40.     return 1;
  41. }
  42.  
  43. stock ResetVars(playerid)
  44. {
  45.     pInfo[playerid][FPS] = 0;
  46.     return 1;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement