Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:hfind(playerid, params[]) {
- if(PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pRank] >= 5&&
- PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2 && PlayerInfo[playerid][pRank] >= 5 &&
- PlayerInfo[playerid][pMember] != 16 && PlayerInfo[playerid][pLeader] != 16) {
- return 1;
- }
- new
- iTargetID;
- if(sscanf(params, "u", iTargetID)) {
- return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /hfind [player]");
- }
- else if(iTargetID == playerid) {
- return SendClientMessageEx(playerid, COLOR_GREY, "You can't use this command on yourself.");
- }
- else if(!IsPlayerConnected(iTargetID)) {
- return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
- }
- else if(GetPlayerInterior(iTargetID) != 0) {
- return SendClientMessageEx(playerid, COLOR_GREY, "That person is inside an interior.");
- }
- else if(PlayerInfo[iTargetID][pAdmin] >= 2) {
- return SendClientMessageEx(playerid, COLOR_GREY, "You are unable to find this person.");
- }
- else if(PhoneOnline[iTargetID] > 0) {
- return SendClientMessageEx(playerid, COLOR_GREY, "* The signal cannot be reached.");
- }
- if(GetPVarType(playerid, "hFind")) {
- SendClientMessageEx(playerid, COLOR_GRAD2, "Stopped Updating");
- DeletePVar(playerid, "hFind");
- DisablePlayerCheckpoint(playerid);
- }
- else
- {
- new
- szZone[MAX_ZONE_NAME],
- szMessage[108];
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(iTargetID, X, Y, Z);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, X, Y, Z, 4.0);
- GetPlayer3DZone(iTargetID, szZone, sizeof(szZone));
- format(szMessage, sizeof(szMessage), "Tracking on %s, last seen at %s.", GetPlayerNameEx(iTargetID), szZone);
- SendClientMessageEx(playerid, COLOR_GRAD2, szMessage);
- SendClientMessageEx(playerid, COLOR_GRAD2, "Type /hfind again to stop tracking.");
- SetPVarInt(playerid, "hFind", iTargetID);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement