Advertisement
BanhVo

Untitled

Jan 17th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. CMD:ffind(playerid, params[])
  2. {
  3. if (PlayerInfo[playerid][pLeader] == 1) && (PlayerInfo[playerid][pRank] = 3) || PlayerInfo[playerid][pShopTech] >= 0)
  4. {
  5. SendClientMessageEx(playerid, COLOR_RED, "* Listing all gates within 5 meters of you...");
  6. for(new i, Float: fGatePos[3], szMessage[32]; i < MAX_GATES; i++)
  7. {
  8. GetDynamicObjectPos(GateInfo[i][gGATE], fGatePos[0], fGatePos[1], fGatePos[2]);
  9. if(IsPlayerInRangeOfPoint(playerid, 5, fGatePos[0], fGatePos[1], fGatePos[2]))
  10. {
  11. if(GateInfo[i][gModel] != 0)
  12. {
  13. format(szMessage, sizeof(szMessage), "Gate ID %d (VW: %d) | %f from you", i, GateInfo[i][gVW], GetPlayerDistanceFromPoint(playerid, fGatePos[0], fGatePos[1], fGatePos[2]));
  14. SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
  15. }
  16. }
  17. }
  18. }
  19. else
  20. {
  21. SendClientMessageEx(playerid, COLOR_GRAD2, "Ban khong duoc phep su dung lenh nay.");
  22. }
  23. return 1;
  24. }
  25.  
  26. CMD:fkey(playerid, params[])
  27. {
  28. new gateid;
  29. if(sscanf(params, "i", gateid))
  30. {
  31. SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /fkey [gateid]");
  32. return 1;
  33. }
  34. if (PlayerInfo[playerid][pLeader] == 1) && (PlayerInfo[playerid][pRank] = 3) || PlayerInfo[playerid][pShopTech] >= 0)
  35. {
  36. new string[128], timertxt, distancetxt;
  37.  
  38. switch(GateInfo[gateid][gTimer])
  39. {
  40. case 1: timertxt = 1;
  41. case 2: timertxt = 3;
  42. case 3: timertxt = 5;
  43. case 4: timertxt = 10;
  44. default: timertxt = 0;
  45. }
  46. switch(GateInfo[gateid][gRenderHQ])
  47. {
  48. case 1: distancetxt = 100;
  49. case 2: distancetxt = 150;
  50. case 3: distancetxt = 200;
  51. default: distancetxt = 60;
  52. }
  53.  
  54. format(string,sizeof(string),"|___________ Gate Status (ID: %d) ___________|", gateid);
  55. SendClientMessageEx(playerid, COLOR_GREEN, string);
  56. format(string, sizeof(string), "X: %f | Y: %f | Z: %f | RotX: %f | RotY: %f | RotZ: %f", GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ], GateInfo[gateid][gRotX], GateInfo[gateid][gRotY], GateInfo[gateid][gRotZ]);
  57. SendClientMessageEx(playerid, COLOR_WHITE, string);
  58. format(string, sizeof(string), "XM: %f | YM: %f | ZM: %f | RotXM: %f | RotYM: %f | RotZM: %f", GateInfo[gateid][gPosXM], GateInfo[gateid][gPosYM], GateInfo[gateid][gPosZM], GateInfo[gateid][gRotXM], GateInfo[gateid][gRotYM], GateInfo[gateid][gRotZM]);
  59. SendClientMessageEx(playerid, COLOR_WHITE, string);
  60. format(string, sizeof(string), "Model: %d | HID: %d | VW: %d | Int: %d | Allegiance: %d | Group Type: %d | Group: %d | Family: %d", GateInfo[gateid][gModel], GateInfo[gateid][gHID], GateInfo[gateid][gVW], GateInfo[gateid][gInt], GateInfo[gateid][gAllegiance], GateInfo[gateid][gGroupType], GateInfo[gateid][gGroupID], GateInfo[gateid][gFamilyID]);
  61. SendClientMessageEx(playerid, COLOR_WHITE, string);
  62. format(string, sizeof(string), "Range: %.3f | Speed: %.3f | Timer: %d second(s) | Stream: %d | Automated: %d | Locked: %d | Pass: %s", GateInfo[gateid][gRange], GateInfo[gateid][gSpeed], timertxt, distancetxt, GateInfo[gateid][gAutomate], GateInfo[gateid][gLocked], GateInfo[gateid][gPass]);
  63. SendClientMessageEx(playerid, COLOR_WHITE, string);
  64. }
  65. else SendClientMessageEx(playerid, COLOR_GRAD1, "Ban khong duoc phep su dung lenh nay.");
  66. return 1;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement