- 0
Detectiv /find
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Mr.Michael
Problema intalnita (descriere): In primu rand am creat o comanda /find si cand dau find pe mine spre ex nu ramane checkpointu pe mine . Am vazut la /wanted ca poti cauta pe cineva si de acolo am luat functia playertofind am facut tot una la fel care se numeste playertofound cum e la wanted o sa va dau ce am facut eu si ce e acolo la wanted poate ma ajutati .
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:
YCMD:find(playerid, params[], help) { new id; new string[128]; new name[MAX_PLAYER_NAME]; if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected."); if(PlayerData[playerid][Job] != 7) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: You are not a Detectiv!"); if(sscanf(params,"u", playerid)) return SendClientMessage(playerid,-1,"{FF0000}Folosire: {15FF00}/find [playerid Jucator]"); new Float:x,Float:y,Float:z; GetPlayerPos(id, x,y,z); SetPlayerCheckpoint(playerid, x,y,z, 3); GetPlayerName(id, givername, sizeof(givername)); format(string, sizeof(string), "Ai pus checkpoint pe jucatorul: {FF0000}%s {15FF00}(%d) {FFCC33}!",givername, id); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); PlayerData[playerid][PlayerToFound] = id; return 1; } case DIALOG_WANTED: { if(response) { new id = Suspects[playerid][listitem]; if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected."); SendClientMessage(playerid, COLOR_WHITE,"{5181EE}______-={FFFFFF}MOBILE DATA COMPUTER{5181EE}=-_______"); format(string, sizeof(string), "{B5B5B5}Name: {FFFFFF}%s", PlayerData[id][Name]); SendClientMessage(playerid, COLOR_WHITE,string); format(string, sizeof(string), "{B5B5B5}Current Crimes: {FFFFFF}%d", PlayerData[id][MDC]); SendClientMessage(playerid, COLOR_WHITE,string); format(string, sizeof(string), "{B5B5B5}Wanted Level: {FFFFFF}%d", PlayerData[id][WantedLevel]); SendClientMessage(playerid, COLOR_WHITE,string); format(string, sizeof(string), "{B5B5B5}Time until track lose: {FFFFFF}%d mins", PlayerData[id][TrackLose]); SendClientMessage(playerid, COLOR_WHITE,string); if(PlayerData[id][MDC] == 0) { SendClientMessage(playerid, COLOR_GRAD2,"Last Crime:"); format(string,sizeof(string),"- %s {B5B5B5}(Claimant: {FFFFFF}%s{B5B5B5}) on %s",PlayerData[id][LastCrime],PlayerData[id][LastReporter],PlayerData[id][LastDate]); SendClientMessage(playerid, COLOR_WHITE, string); } else { for(new i = 0; i < PlayerData[id][MDC]; i++) { format(string,sizeof(string),"- %s {B5B5B5}(Claimant: {FFFFFF}%s{B5B5B5}) on %s",MDCData[id][i][mReason],MDCData[id][i][mReporter],MDCData[id][i][mDate]); SendClientMessage(playerid, COLOR_WHITE, string); } } format(string, sizeof(string), "{B5B5B5}Total crimes commited: {FFFFFF}%d", PlayerData[id][Crimes]); SendClientMessage(playerid, COLOR_WHITE,string); format(string, sizeof(string), "{B5B5B5}Times arrested: {FFFFFF}%d", PlayerData[id][Arrests]); SendClientMessage(playerid, COLOR_WHITE,string); SendClientMessage(playerid, COLOR_WHITE,"{5181EE}_______________________________________"); new Float:X,Float:Y,Float:Z; GetPlayerPos(id, X,Y,Z); SetPlayerCheckpoint(playerid, X,Y,Z, 3); PlayerData[playerid][PlayerToFind] = id; } else return SendClientMessage(playerid, COLOR_YELLOW2, "You've closed the wanted menu."); } foreach(Player, i) { if(PlayerData[i][PlayerToFind] == playerid) { PlayerData[i][PlayerToFind] = -1; DisablePlayerCheckpoint(i); format(string,sizeof(string),"~w~Find Target %s\n~r~left the game",PlayerData[playerid][Name]); GameTextForPlayer(i, string, 5000, 1); } if(PlayerData[i][PlayerToFound] == playerid) { PlayerData[i][PlayerToFound] = -1; DisablePlayerCheckpoint(i); } if(PlayerData[i][PlayerToFind] >= 0) { new id = PlayerData[i][PlayerToFind]; if(PlayerData[id][InBizz] == -1 && PlayerData[id][InHouse] == -1 && PlayerData[id][InHQ] == -1) { new Float:X,Float:Y,Float:Z; GetPlayerPos(id, X,Y,Z); SetPlayerCheckpoint(i, X,Y,Z, 3); } else { if(PlayerData[id][InBizz] > -1) { new biz = PlayerData[id][InBizz]; SetPlayerCheckpoint(i, BizzInfo[biz][bEntranceX],BizzInfo[biz][bEntranceY],BizzInfo[biz][bEntranceZ], 3); } else if(PlayerData[id][InHouse] > -1) { new house = PlayerData[id][InHouse]; SetPlayerCheckpoint(i, HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez], 3); } else if(PlayerData[id][InHQ] == 3) { SetPlayerCheckpoint(i, 2486.5198,-1645.2394,14.0772, 3); } else if(PlayerData[id][InHQ] == 4) { SetPlayerCheckpoint(i, 2000.0482,-1114.3588,27.1250, 3); } else if(PlayerData[id][InHQ] == 5) { SetPlayerCheckpoint(i, 1899.4996,-2005.1289,13.5469, 3); } else if(PlayerData[id][InHQ] == 6) { SetPlayerCheckpoint(i, 1480.8870,-1770.0392,18.7958, 3); } else if(PlayerData[id][InHQ] == 7) { SetPlayerCheckpoint(i, 755.3737,-1362.3281,13.5131, 3); } else if(PlayerData[id][InHQ] == 8) { SetPlayerCheckpoint(i, 1172.4932,-1323.3479,15.4030, 3); } } } if(PlayerData[i][PlayerToFound] >= 0) { new id = PlayerData[i][PlayerToFound]; if(PlayerData[id][InBizz] == -1 && PlayerData[id][InHouse] == -1 && PlayerData[id][InHQ] == -1) { new Float:X,Float:Y,Float:Z; GetPlayerPos(id, X,Y,Z); SetPlayerCheckpoint(i, X,Y,Z, 6); } else { if(PlayerData[id][InBizz] > -1) { new biz = PlayerData[id][InBizz]; SetPlayerCheckpoint(i, BizzInfo[biz][bEntranceX],BizzInfo[biz][bEntranceY],BizzInfo[biz][bEntranceZ], 6); } else if(PlayerData[id][InHouse] > -1) { new house = PlayerData[id][InHouse]; SetPlayerCheckpoint(i, HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez], 6); } else if(PlayerData[id][InHQ] == 3) { SetPlayerCheckpoint(i, 2486.5198,-1645.2394,14.0772, 6); } else if(PlayerData[id][InHQ] == 4) { SetPlayerCheckpoint(i, 2000.0482,-1114.3588,27.1250, 6); } else if(PlayerData[id][InHQ] == 5) { SetPlayerCheckpoint(i, 1899.4996,-2005.1289,13.5469, 6); } else if(PlayerData[id][InHQ] == 6) { SetPlayerCheckpoint(i, 1480.8870,-1770.0392,18.7958, 6); } else if(PlayerData[id][InHQ] == 7) { SetPlayerCheckpoint(i, 755.3737,-1362.3281,13.5131, 6); } else if(PlayerData[id][InHQ] == 8) { SetPlayerCheckpoint(i, 1172.4932,-1323.3479,15.4030, 6); } } }10 answers to this question
Recommended Posts