Advertisement
Guest User

Pawno palogigaa

a guest
Jan 25th, 2014
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.95 KB | None | 0 0
  1. CMD:hfind(playerid, params[]) {
  2.     if(PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pRank] >= 5&&
  3.     PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2 && PlayerInfo[playerid][pRank] >= 5 &&
  4.     PlayerInfo[playerid][pMember] != 16 && PlayerInfo[playerid][pLeader] != 16) {
  5.         return 1;
  6.     }
  7.     new
  8.         iTargetID;
  9.  
  10.     if(sscanf(params, "u", iTargetID)) {
  11.         return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /hfind [player]");
  12.     }
  13.     else if(iTargetID == playerid) {
  14.         return SendClientMessageEx(playerid, COLOR_GREY, "You can't use this command on yourself.");
  15.     }
  16.     else if(!IsPlayerConnected(iTargetID)) {
  17.         return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
  18.     }
  19.     else if(GetPlayerInterior(iTargetID) != 0) {
  20.         return SendClientMessageEx(playerid, COLOR_GREY, "That person is inside an interior.");
  21.     }
  22.     else if(PlayerInfo[iTargetID][pAdmin] >= 2) {
  23.         return SendClientMessageEx(playerid, COLOR_GREY, "You are unable to find this person.");
  24.     }
  25.     else if(PhoneOnline[iTargetID] > 0) {
  26.         return SendClientMessageEx(playerid, COLOR_GREY, "* The signal cannot be reached.");
  27.     }
  28.  
  29.     if(GetPVarType(playerid, "hFind")) {
  30.         SendClientMessageEx(playerid, COLOR_GRAD2, "Stopped Updating");
  31.         DeletePVar(playerid, "hFind");
  32.         DisablePlayerCheckpoint(playerid);
  33.     }
  34.     else
  35.     {
  36.         new
  37.             szZone[MAX_ZONE_NAME],
  38.             szMessage[108];
  39.  
  40.         new Float:X, Float:Y, Float:Z;
  41.         GetPlayerPos(iTargetID, X, Y, Z);
  42.         DisablePlayerCheckpoint(playerid);
  43.         SetPlayerCheckpoint(playerid, X, Y, Z, 4.0);
  44.         GetPlayer3DZone(iTargetID, szZone, sizeof(szZone));
  45.         format(szMessage, sizeof(szMessage), "Tracking on %s, last seen at %s.", GetPlayerNameEx(iTargetID), szZone);
  46.         SendClientMessageEx(playerid, COLOR_GRAD2, szMessage);
  47.         SendClientMessageEx(playerid, COLOR_GRAD2, "Type /hfind again to stop tracking.");
  48.         SetPVarInt(playerid, "hFind", iTargetID);
  49.     }
  50.     return 1;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement