Advertisement
Guest User

Untitled

a guest
Oct 6th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.99 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #if defined FILTERSCRIPT
  8.  
  9.  
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" Meu Primeiro script Game mode");
  15.     print("--------------------------------------\n");
  16.     return 1;
  17. }
  18.  
  19.  
  20.  
  21. forward mensagem();
  22. public mensagem();
  23. {
  24.     SendClientMessageToAll(0x808080AA, "Ola");
  25.     print("tamo dentro do timer")
  26.     return 1;
  27. }
  28.  
  29. #else
  30.  
  31. main()
  32. {
  33.     print("tamo dentro");
  34.  
  35. }
  36.  
  37.  
  38.  
  39. #endif
  40.  
  41. public OnGameModeInit()
  42. {
  43.     // Don't use these lines if it's a filterscript
  44.     SetGameModeText("Blank Script");
  45.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  46.     SetTimer("mensagem", 1000, true);
  47.     return 1;
  48. }
  49.  
  50.  
  51.  
  52. public OnPlayerRequestClass(playerid, classid)
  53. {
  54.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  55.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  56.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  57.     SetTimer("mensagem", 1000, false);
  58.     return 1;
  59. }
  60.  
  61. public OnPlayerCommandText(playerid, cmdtext[])
  62. {
  63.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  64.     {
  65.         //SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  66.         new Float:x, Float:y, Float:z;
  67.         GetPlayerPos(playerid, x, y, z);
  68.        
  69.         CreateVehicle(503, x+20, y, z, 82.2873, -1, -1, 60);
  70.         return 1;
  71.     }
  72.    
  73.     if (!strcmp("/velocity", cmdtext))
  74.     {
  75.         new Float:Velocity[3], string[80];
  76.         GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
  77.         format(string, sizeof(string), "You are going at a velocity of X: %f, Y: %f, Z: %f", Velocity[0], Velocity[1], Velocity[2]);
  78.         SendClientMessage(playerid, 0xFFFFFFFF, string);
  79.         return 1;
  80.     }
  81.      
  82.     if (!strcmp("/criar", cmdtext))
  83.     {
  84.         new Float:x, Float:y, Float:z;
  85.         GetPlayerPos(playerid, x, y, z);
  86.         CreateObject(25, x, y, z, 0.0, 0.0, 96.0, 300.0);
  87.         return 1;
  88.     }
  89.     return 0;
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement