Advertisement
Guest User

Untitled

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