Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.92 KB | None | 0 0
  1. // Copyright © 2010 RealCop228 (Nick Piccoli)
  2. // You are free to edit this script all you
  3. // need, but you are NOT free to release this
  4. // script without my permission, RealCop228.
  5.  
  6. #define FILTERSCRIPT
  7.  
  8. #include <a_samp>
  9. #include <zcmd>
  10.  
  11. #define COLOR_RED   0xE60000FF
  12. #define COLOR_WHITE 0xFFFFFFAA
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.     print(" R-Positions by RealCop228 has been successfully loaded. ");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     return 1;
  23. }
  24.  
  25. public OnPlayerConnect(playerid)
  26. {
  27.     return 1;
  28. }
  29.  
  30. public OnPlayerDisconnect(playerid, reason)
  31. {
  32.     return 1;
  33. }
  34.  
  35. command(savepos, playerid, params[])
  36. {
  37.     new string[128], Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  38.     if(!IsPlayerAdmin(playerid))
  39.         return SendClientMessage(playerid, COLOR_RED, "You are not an RCON administrator!");
  40.  
  41.     GetPlayerPos(playerid, PosX, PosY, PosZ);
  42.     GetPlayerFacingAngle(playerid, Angle);
  43.     SetPVarFloat(playerid, "PositionX", PosX);
  44.     SetPVarFloat(playerid, "PositionY", PosY);
  45.     SetPVarFloat(playerid, "PositionZ", PosZ);
  46.     SetPVarFloat(playerid, "PositionA", Angle);
  47.     format(string, sizeof(string), "You have saved your position to %f, %f, %f, %f.", PosX, PosY, PosZ, Angle);
  48.     SendClientMessage(playerid, COLOR_WHITE, string);
  49.     return 1;
  50. }
  51.  
  52. command(gotopos, playerid, params[])
  53. {
  54.     new string[128], Float:PosX, Float:PosY, Float:PosZ, Float:PosA;
  55.     if(!IsPlayerAdmin(playerid))
  56.         return SendClientMessage(playerid, COLOR_RED, "You are not an RCON administrator!");
  57.  
  58.     PosX = GetPVarFloat(playerid, "PositionX");
  59.     PosY = GetPVarFloat(playerid, "PositionY");
  60.     PosZ = GetPVarFloat(playerid, "PositionZ");
  61.     PosA = GetPVarFloat(playerid, "PositionA");
  62.     SetPlayerPos(playerid, PosX, PosY, PosZ);
  63.     SetPlayerFacingAngle(playerid, PosA);
  64.     format(string, sizeof(string), "You have been warped to your position at %f, %f, %f, %f.", PosX, PosY, PosZ, PosA);
  65.     SendClientMessage(playerid, COLOR_WHITE, string);
  66.     return 1;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement