Mr.Michael
-
Posts
12 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Posts posted by Mr.Michael
-
-
Am 20 de ani si ma pricep la administrare unui server astept pm cu server-ul si sa stam de vorba
-
tot nu merge . da la dialog_wanted cand da click pe cineva se tine dupa el checkpointu da la comanda /find nu se tine nu stiu de ce. am postat dialog wanted
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."); }
-
UP , Ma ajuta si pe mine cineva ?
-
eu am facut un timer
Citatfunction FindTimer()
{
foreach(Player, i)
{
if(PlayerData[PlayerToFond] >= 0)
{
new id = PlayerData[PlayerToFond];
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); }
}
}
}
}si la /find am pus asa
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, name, sizeof(name)); for(new i = 0; i < PlayerData[playerid][PlayerToFond]; i++) PlayerData[playerid][PlayerToFond] = id; format(string, sizeof(string), "Ai pus checkpoint pe jucatorul: {FF0000}%s {15FF00}(%d) {FFCC33}!",name, id); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; }
si tot nu merge...
-
Chiar acum, NoNamed a spus:
Faci un timer care se activeaza atunci cand folosesti comanda /find cu checkpoint care sa se ataseze de player-ul pe care vrei sa-l gasesti .
si cum fac ca sa se ataseze care-i functia
-
Deci am testat cu un baiat si cand dau find nu sta checkpointu pe el eu vreau cand se misca se stea dupa el checkpointu cam 2-3 minute exact cum e jobu detectiv si fara skill de detectiv si daca se duce in casa sau bizz sa ramana checkpointu dupa el
-
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); } } }
-
As avea si eu nevoie de o comanda /find pentru ca mi-am facut una da nu sta dupa player si nu stiu cum sa o fac
YCMD:find(playerid, params[], help) { if(PlayerData[playerid][Job] != 7) { new id; new Float:X; new Float:Y; new Float:Z; new string[128]; new name[MAX_PLAYER_NAME]; if(sscanf(params,"u", ID)) return SendClientMessage(playerid,-1,"{FF0000}Folosire: {15FF00}/find [ID Jucator]"); GetPlayerPos(playerid, X, Y, Z); SetPlayerCheckpoint(playerid, X, Y, Z, 6.0); GetPlayerName(id, name, sizeof(name)); format(string, sizeof(string), "Ai pus checkpoint pe jucatorul: {FF0000}%s {15FF00}(%d) {FFCC33}!", name, ID); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } else { SendClientMessage(playerid, -1, "{FFCC33}Nu esti detectiv!"); } return 1; }
-
Arata onplayerstate
-
T/C mi-am rezolvat singur problema
-
Problema intalnita (descriere): Salut , am o problema cu PD si C.I.A cand pd si cia omoara un civil/mafiot care are wanted nu il trimite la jail il trimite la spawn
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): -
Imagini / Video (optional):if(newstate == PLAYER_STATE_WASTED) { if(PlayerData[playerid][WantedLevel] >= 1) { new price = PlayerData[playerid][WantedLevel] * 100; new count, cop; foreach(Player, i) { new f2 = PlayerData[i][Member] + PlayerData[i][Leader]; if(f2 == 1 && CrimInRange(20.0, playerid,i)) if(f2 == 2 && CrimInRange(20.0, playerid,i)) // adaugata la mn pt wanted da nu merge { count = 1; format(string, sizeof(string), "~w~Suspect~r~Dead~n~Bonus~g~$%d", price); GameTextForPlayer(i, string, 5000, 1); GivePlayerCash(i, price); cop = i; } } if(count == 1) { new time = 0, str[128]; switch(PlayerData[playerid][WantedLevel]) { case 1: { time = 720; } case 2: { time = 960; } case 3: { time = 1440; } case 4: { time = 1820; } case 5: { time = 2160;} case 6: { time = 2400;} } GivePlayerCash(playerid, -price); ResetPlayerWeapons(playerid); PlayerData[playerid][WantedLevel] = 0; PlayerData[playerid][TrackLose] = 0; PlayerData[playerid][JailTime] = time; PlayerData[playerid][Jailed] = 1; PlayerData[playerid][MDC] = 0; SetPlayerWantedLevel(playerid, 0); mysql_format(SQL, str,128,"UPDATE `users` SET `WantedLevel`='0',`TrackLose`='0',`Jailed`='1' WHERE `ID`='%d' LIMIT 1",PlayerData[playerid][ID]); mysql_tquery(SQL, str, "", ""); mysql_format(SQL, str,128,"UPDATE `users` SET `JailTime`='%d' WHERE `ID`='%d' LIMIT 1",PlayerData[playerid][JailTime],PlayerData[playerid][ID]); mysql_tquery(SQL, str, "", ""); format(string, sizeof(string), "You are jailed for %d seconds (-$%s).", PlayerData[playerid][JailTime], Decimal(price)); SendClientMessage(playerid, COLOR_1BLUE, string); format(string, sizeof(string), "<< %s killed suspect %s for %d seconds ($%s). >>", PlayerData[cop][Name], PlayerData[playerid][Name], time, Decimal(price)); SendRadioMessage(1, COLOR_LIGHTRED, string); SendRadioMessage(2, COLOR_LIGHTRED, string);// adaugata la mn pt wanted RemovePlayerAttachedObject(playerid,0); } } }
Ati incercat sa rezolvati singur?: am rezolvat o alta problema inainte c.i.a lua wanted acuma mi-a mai ramas problema asta nici pd nici c.i.a nu pot trimite in jailP.S am incercat si eu sa rezolv problema asta da nu stiu cum am umblat si la onplayerdeath aici cred ca e ceva daia v-am dat codul
Caut Testeri
in Caut servicii / partener / etc.
Posted
Cautam testeri pentru a testa job-urile factiunile etc
Mai Cautam 3 playeri pentru a face reclama