Guest User

Untitled

a guest
Dec 28th, 2010
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.43 KB | None | 0 0
  1. //==============================================================================
  2. #include <a_samp>
  3. #define FILTERSCRIPT // Define que e filter Script (:
  4. #define MAX_CAM     500  // Maximo de Cameras
  5. #define Gay         "Drakon"  // Define que todo gay se resume ao drakon
  6. //==============================================================================
  7. new
  8.     Total=-1;
  9. enum
  10.     Cams
  11. {
  12.     CameraN[100],
  13.     Float:Cod1,
  14.     Float:Cod2,
  15.     Float:Cod3,
  16.     Float:Angulo,
  17.     ID
  18. };
  19. new
  20.     Camera[MAX_CAM][Cams];
  21. //==============================================================================
  22. public
  23.     OnFilterScriptInit()
  24. {
  25.     print("\n--------------------------------------");
  26.     print("Sistema de Camera By: Higor (:");
  27.     print("--------------------------------------\n");
  28.  
  29.     AddCamera("Los Santos", 1209.8090,-1751.8210,13.5937,2125.52);
  30.  
  31.     return true;
  32. }
  33.  
  34.  
  35. //==============================================================================
  36. stock
  37.     AddCamera(nomete[], Float:codd1, Float:codd2, Float:codd3,Float:angle1)
  38. {
  39.     Total++;
  40.     format(Camera[Total][CameraN],100,"%s",nomete);
  41.     Camera[Total][Cod1] = codd1;
  42.     Camera[Total][Cod2] = codd2;
  43.     Camera[Total][Cod3] = codd3;
  44.     Camera[Total][Angulo] = angle1;
  45.     Camera[Total][ID] = Total;
  46.     printf("ID: %d Camera: %s  ",Total,Camera[Total][CameraN]);
  47.     return true;
  48. }
  49.  
  50. //==============================================================================
  51. public
  52.     OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  53. {
  54.     new string[128];
  55.     if(listitem == Camera[listitem][ID])
  56.     {
  57.         if(!response) return false;
  58.         format(string, sizeof(string), "Camera -> %s", Camera[listitem][CameraN]);
  59.         SendClientMessage(playerid, 0xFFFFFFFF, string);
  60.         SetPlayerCameraPos(playerid,Camera[listitem][Cod1],Camera[listitem][Cod2],Camera[listitem][Cod3]);
  61.         SetPlayerFacingAngle(playerid,Camera[listitem][Angulo]);
  62.         return true;
  63.     }
  64.     return false;
  65. }
  66.  
  67.  
  68. //==============================================================================
  69. public
  70.     OnPlayerCommandText(playerid, cmdtext[])
  71. {
  72.     if(!strcmp(cmdtext, "/cameras", true)) {
  73.         new dados[1050];
  74.         format(dados, 1050, "");
  75.         for(new i=0;i<=Total;i++) {
  76.             format(dados,1050, "%s%s\n",dados,Camera[i][CameraN]);
  77.         }
  78.         ShowPlayerDialog(playerid,251,DIALOG_STYLE_LIST, "Cameras",dados,"Ver", "Sair");
  79.     }
  80.  
  81.     return false;
  82. }
Advertisement
Add Comment
Please, Sign In to add comment