Poftim:
public OnPlayerText(playerid, text[])
{
new giver[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new tmp[256];
new string[512];
new giveplayerid;
if ( !strlen ( text ) ) return 0;
if(ReactionState == R_STATE_ACTIVE)
{
if(!strcmp(text, ReactionString, false))
{
ReactionState = R_STATE_NOT_ACTIVE;
GetPlayerName(playerid,giveplayer,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s a castigat eventul rapid si a primit {87CEFA}%s${FFFFFF}!",giveplayer,FormatNumber(ReactionCash));
SendClientMessageToAll(-1,string);
GivePlayerCash(playerid, ReactionCash);
ReactionCash = 0;
}
}
if(GoIP(text))
{
new reclama[MAX_PLAYER_NAME];
GetPlayerName(playerid, reclama, sizeof(reclama));
format(string, sizeof(string), "ADMIN INFO: %s a primit kick de la Admin-Bot, motiv: Reclama",reclama);
SendClientMessageToAll(COLOR_LIGHTRED,string);
Kick(playerid);
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Nu poti scrie, ai primit mute!");
return 0;
}
if(DMVT[playerid] > 0)
{
new idx;
tmp = strtok(text, idx);
if(DMVT[playerid] == 1)
{
if ((strcmp("A", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("A")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("B", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("B")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("C", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("C")))
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Raspuns corect, trecem la urmatoarea intrebare !");
SetTimerEx("DMVTest2", 5000, 0, "d", playerid);
return 0;
}
else if ((strcmp("D", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("D")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTGREEN,"_____ Intrebare Examen _____");
SendClientMessage(playerid,COLOR_LIGHTBLUE," Ce fac daca vad o masina de politie cu girofarul pornit urmarind un suspect iar eu sunt in masina ?");
SendClientMessage(playerid,COLOR_YELLOW2," A: Opresc masina in pozitia curenta ");
SendClientMessage(playerid,COLOR_YELLOW2," B: Ma bag in fata lor ");
SendClientMessage(playerid,COLOR_YELLOW2," C: Trag pe dreapta ");
SendClientMessage(playerid,COLOR_YELLOW2," D: Ma duc si incerc sa ajut politia ");
}
}
if(DMVT[playerid] == 2)
{
if ((strcmp("A", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("A")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("B", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("B")))
{
SendClientMessage(playerid,COLOR_LIGHTBLUE," Raspuns corect, trecem la urmatoarea intrebare !");
SetTimerEx("DMVTest3", 5000, 0, "d", playerid);
return 0;
}
else if ((strcmp("C", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("C")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("D", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("D")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTGREEN,"_____ Intrebare Examen _____");
SendClientMessage(playerid,COLOR_LIGHTBLUE," Ce pot patesc daca particip intr-o cursa ilegale ?");
SendClientMessage(playerid,COLOR_YELLOW2," A: Nimic,sunt regele soselelor ");
SendClientMessage(playerid,COLOR_YELLOW2," B: Pot intra la inchisoare ");
SendClientMessage(playerid,COLOR_YELLOW2," C: Imi pot distruge masina si nu pot plati reparatile ");
SendClientMessage(playerid,COLOR_YELLOW2," D: Pot sa o castig si sa primesc marele premiu ");
}
}
if(DMVT[playerid] == 3)
{
if ((strcmp("A", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("A")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("B", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("B")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("C", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("C")))
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Raspuns corect, trecem la urmatoarea intrebare !");
SetTimerEx("DMVTest4", 5000, 0, "d", playerid);
return 0;
}
else if ((strcmp("D", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("D")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTGREEN,"_____ Intrebare Examen _____");
SendClientMessage(playerid,COLOR_LIGHTBLUE," Ce fac daca cineva imi fura masina ?");
SendClientMessage(playerid,COLOR_YELLOW2," A: Ma duc,il dau jos din masina,il bat si mi-o iau inapoi ");
SendClientMessage(playerid,COLOR_YELLOW2," B: Alerg pana gasesc alta si o fur ");
SendClientMessage(playerid,COLOR_YELLOW2," C: Sun la politie (( /call 911 )) ");
SendClientMessage(playerid,COLOR_YELLOW2," D: Merg pe jos ");
}
}
if(DMVT[playerid] == 4)
{
if ((strcmp("A", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("A")))
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Raspuns corect. Ai trecut cu bine examenul scris!");
SendClientMessage(playerid,COLOR_WHITE,"{87CEFA}Examen: {FFFFFF}Urca-te intr-o masina DMV pentru a sustine examenul practic!");
TogglePlayerControllable(playerid, 1);
DMVT[playerid] = 0;
TakingLesson[playerid] = 1;
return 0;
}
else if ((strcmp("B", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("B")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("C", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("C")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else if ((strcmp("D", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("D")))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Raspuns gresit. Ai picat examenul scris!");
DMVT[playerid] = 0;
TogglePlayerControllable(playerid, 1);
return 0;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTGREEN,"_____ Intrebare Examen _____");
SendClientMessage(playerid,COLOR_LIGHTBLUE," Cand pot conduce pe partea stanga ?");
SendClientMessage(playerid,COLOR_YELLOW2," A: Cand drumul de pe partea dreapta este blocat ");
SendClientMessage(playerid,COLOR_YELLOW2," B: Cand vreau ");
SendClientMessage(playerid,COLOR_YELLOW2," C: Cand este ceata in fata ");
SendClientMessage(playerid,COLOR_YELLOW2," D: Cand este o coada imensa in fata mea si nu vreau sa astept ");
}
}
}
if(MarriageCeremoney[playerid] > 0)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("da", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("da")))
{
if(GotProposedBy[playerid] < 999)
{
if(IsPlayerConnected(GotProposedBy[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Preot: %s, o iei in casatorie pe %s? (tasteaza 'da', orice altceva va anula casatoria).", giveplayer,sendername);
SendClientMessage(GotProposedBy[playerid], COLOR_WHITE, string);
MarriageCeremoney[GotProposedBy[playerid]] = 1;
MarriageCeremoney[playerid] = 0;
GotProposedBy[playerid] = 999;
return 1;
}
else
{
MarriageCeremoney[playerid] = 0;
GotProposedBy[playerid] = 999;
return 0;
}
}
else if(ProposedTo[playerid] < 999)
{
if(IsPlayerConnected(ProposedTo[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
{
format(string, sizeof(string), "Preot: %s si %s, va declar...sot si sotie, poti saruta mireasa.", sendername, giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Preot: %s si %s, va declar...sot si sotie, poti saruta mirele.", giveplayer, sendername);
SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Mariaj: Avem un cuplu nou de indragostiti, %s & %s si-au jurat credinta si dragoste.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 1)
{
format(string, sizeof(string), "Preot: %s si %s, va declar...sot si sot, poti saruta mireasa.", sendername, giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Preot: %s si %s, va declar...sot si sot, poti saruta mirele.", giveplayer, sendername);
SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Mariaj: Avem un cuplu nou gay, %s & %s si-au jurat credinta si dragoste.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 2 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
{
format(string, sizeof(string), "Preot: %s si %s, va declar...sotie si sotie, poti saruta mireasa.", sendername, giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Preot: %s si %s, va declar...sotie si sotie, poti saruta mirele.", giveplayer, sendername);
SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Mariaj: Avem un cuplu nou lesbian, %s & %s si-au jurat credinta si dragoste.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
//MarriageCeremoney[ProposedTo[playerid]] = 1;
MarriageCeremoney[ProposedTo[playerid]] = 0;
MarriageCeremoney[playerid] = 0;
format(string, sizeof(string), "%s", sendername);
strmid(PlayerInfo[ProposedTo[playerid]][pMarriedTo], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s", giveplayer);
strmid(PlayerInfo[playerid][pMarriedTo], string, 0, strlen(string), 255);
GivePlayerCash(playerid, - 100000);
PlayerInfo[playerid][pMarried] = 1;
PlayerInfo[ProposedTo[playerid]][pMarried] = 1;
PlayerInfo[ProposedTo[playerid]][pPhousekey] = PlayerInfo[playerid][pPhousekey];
PlayerInfo[ProposedTo[playerid]][pPbiskey] = PlayerInfo[playerid][pPbiskey];
ProposedTo[playerid] = 999;
MarriageCeremoney[playerid] = 0;
return 1;
}
else
{
MarriageCeremoney[playerid] = 0;
ProposedTo[playerid] = 999;
return 0;
}
}
}
else
{
if(GotProposedBy[playerid] < 999)
{
if(IsPlayerConnected(GotProposedBy[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Ai refuzat casatoria cu %s, de aceea mariajul a fost anulat.",giveplayer);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s nu doreste sa se casatoreasca cu tine, de aceea mariajul a fost anulat.",sendername);
SendClientMessage(GotProposedBy[playerid], COLOR_YELLOW, string);
return 0;
}
else
{
MarriageCeremoney[playerid] = 0;
GotProposedBy[playerid] = 999;
return 0;
}
}
else if(ProposedTo[playerid] < 999)
{
if(IsPlayerConnected(ProposedTo[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Ai refuzat casatoria cu %s, de aceea mariajul a fost anulat.",giveplayer);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s nu doreste sa se casatoreasca cu tine, de aceea mariajul a fost anulat.",sendername);
SendClientMessage(ProposedTo[playerid], COLOR_YELLOW, string);
return 0;
}
else
{
MarriageCeremoney[playerid] = 0;
ProposedTo[playerid] = 999;
return 0;
}
}
}
return 0;
}
if(WritingPaper[playerid] > 0)
{
new line;
new nstring[256];
new idx;
new length = strlen(text);
while ((idx < length) && (text[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = text[idx];
idx++;
}
result[idx - offset] = EOS;
result[0] = toupper(result[0]);
if(!strlen(result))
{
if(WritingLine[playerid] == 1) { SendClientMessage(playerid, COLOR_GRAD2, "* Tasteaza titlul ziarului!"); }
else { SendClientMessage(playerid, COLOR_LIGHTRED, "* Tasteaza continutul ziarului!"); }
return 0;
}
format(nstring, sizeof(nstring), "%s", text);
switch(WritingLine[playerid])
{
case 1:
{
new fstring[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(fstring, sizeof(fstring), "%s", sendername);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperMaker], fstring, 0, strlen(fstring), 255);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperTitle], nstring, 0, strlen(nstring), 255);
line = 0; WritingLine[playerid] = 2;
SendClientMessage(playerid, COLOR_LIGHTRED, "* Acum poti scrie sub titlu, ti-au ramas 7 linii!");
}
case 2:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText1], nstring, 0, strlen(nstring), 255);
line = 1; WritingLine[playerid] = 3;
}
case 3:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText2], nstring, 0, strlen(nstring), 255);
line = 2; WritingLine[playerid] = 4;
}
case 4:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText3], nstring, 0, strlen(nstring), 255);
line = 3; WritingLine[playerid] = 5;
}
case 5:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText4], nstring, 0, strlen(nstring), 255);
line = 4; WritingLine[playerid] = 6;
}
case 6:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText5], nstring, 0, strlen(nstring), 255);
line = 5; WritingLine[playerid] = 7;
}
case 7:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText6], nstring, 0, strlen(nstring), 255);
line = 6; WritingLine[playerid] = 8;
}
case 8:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText7], nstring, 0, strlen(nstring), 255);
PaperInfo[WritingPaperNumber[playerid]][PaperUsed] = 1;
SavePapers();
line = 7; WritingLine[playerid] = 0; WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999;
}
}
if(line > 0)
{
format(string, sizeof(string), "* Ai scris linia %d a ziarului.", line);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(line == 7)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ziarul tau a fost publicat pe lista cu anunturi (pentru Ziaristi)!");
}
}
return 0;
}
if(ConnectedToPC[playerid] == 255)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("Contracts", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Contracts")))
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "Doar asasinii cu rang 4+ pot oferi contracte celorlalti asasini!");
return 0;
}
SearchingHit(playerid);
return 0;
}
else if ((strcmp("News", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("News")))
{
new x_nr[256];
x_nr = strtok(text, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_YQLMX, "__________________ Hitman Agency News __________________");
SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: News [number] or News delete [number] or News delete all");
format(string, sizeof(string), "1: %s :: Hitman: %s", News[hAdd1], News[hContact1]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "2: %s :: Hitman: %s", News[hAdd2], News[hContact2]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "3: %s :: Hitman: %s", News[hAdd3], News[hContact3]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "4: %s :: Hitman: %s", News[hAdd4], News[hContact4]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "5: %s :: Hitman: %s", News[hAdd5], News[hContact5]);
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_YQLMX, "________________________________________________________");
return 0;
}//lets start
if(strcmp(x_nr,"1",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Already placed a News Message, it must be deleted first !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, " You must be Rank 3 to write messages to the News Channel !"); return 0; }
if(News[hTaken1] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " News Text to short !"); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact1], string, 0, strlen(string), 255);
News[hTaken1] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You placed a News Message on the Hitman Agency's News Channel.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spot 1 is already Taken !");
return 0;
}
}
else if(strcmp(x_nr,"2",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Already placed a News Message, it must be deleted first !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, " You must be Rank 3 to write messages to the News Channel !"); return 0; }
if(News[hTaken2] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " News Text to short !"); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact2], string, 0, strlen(string), 255);
News[hTaken2] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You placed a News Message on the Hitman Agency's News Channel.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spot 2 is already Taken !");
return 0;
}
}
else if(strcmp(x_nr,"3",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Already placed a News Message, it must be deleted first !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, " You must be Rank 3 to write messages to the News Channel !"); return 0; }
if(News[hTaken3] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " News Text to short !"); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact3], string, 0, strlen(string), 255);
News[hTaken3] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You placed a News Message on the Hitman Agency's News Channel.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spot 3 is already Taken !");
return 0;
}
}
else if(strcmp(x_nr,"4",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Already placed a News Message, it must be deleted first !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, " You must be Rank 3 to write messages to the News Channel !"); return 0; }
if(News[hTaken4] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " News Text to short !"); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact4], string, 0, strlen(string), 255);
News[hTaken4] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You placed a News Message on the Hitman Agency's News Channel.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spot 4 is already Taken !");
return 0;
}
}
else if(strcmp(x_nr,"5",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Already placed a News Message, it must be deleted first !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, " You must be Rank 3 to write messages to the News Channel !"); return 0; }
if(News[hTaken5] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " News Text to short !"); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact5], string, 0, strlen(string), 255);
News[hTaken5] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You placed a News Message on the Hitman Agency's News Channel.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spot 5 is already Taken !");
return 0;
}
}
else if(strcmp(x_nr,"delete",true) == 0)
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "Iti trebuie rang 4 pentru a putea sterge mesajele de pe canalulu Hitman!");
return 0;
}
new string1[MAX_PLAYER_NAME];
new x_tel[256];
x_tel = strtok(text, idx);
if(!strlen(x_tel)) {
SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: News delete [number] or News delete all.");
return 0;
}
if(strcmp(x_tel,"1",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai sters un mesaj (1) de pe canalul Hitman Agency!");
return 0;
}
else if(strcmp(x_tel,"2",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai sters un mesaj (2) de pe canalul Hitman Agency!");
return 0;
}
else if(strcmp(x_tel,"3",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai sters un mesaj (3) de pe canalul Hitman Agency!");
return 0;
}
else if(strcmp(x_tel,"4",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai sters un mesaj (4) de pe canalul Hitman Agency!");
return 0;
}
else if(strcmp(x_tel,"5",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai sters un mesaj (5) de pe canalul Hitman Agency!");
return 0;
}
else if(strcmp(x_tel,"all",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Nu exista"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai sters toate mesajele noi de pe canalul Hitman!");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: News delete [number] or News delete all.");
return 0;
}
}
else { return 0; }
}
else if ((strcmp("Givehit", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Givehit")))
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "Iti trebuie rang 4 pentru a oferi contracte asasinilor!");
return 0;
}
if(hitfound == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Inca nu ai cautat o tinta, vizualizeaza contractele!");
return 0;
}
tmp = strtok(text, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Tasteaza: Givehit [ID/nume jucator]");
return 0;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] == 8 || PlayerInfo[giveplayerid][pLeader] == 8)
{
if(GoChase[giveplayerid] < 999)
{
SendClientMessage(playerid, COLOR_GREY, "* Acest asasin are deja un contract!");
return 0;
}
if(IsPlayerConnected(hitid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giver, sizeof(giver));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
//format(string, sizeof(string), "* You assigned%s to kill: %s(ID:%d), for $%d.", giver, giveplayer, hitid, PlayerInfo[hitid][pValue]);
//SendClientMessage(playerid, COLOR_YELLOW, string);
//format(string, sizeof(string), "* Hitman %s has assigned you to kill: %s(ID:%d), for $%d.", sendername, giveplayer, hitid, PlayerInfo[hitid][pValue]);
//SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* Asasin %s i-a oferit lui %s contractul: %s (ID: %d), in valoare de $%s.", sendername, giver, giveplayer, hitid, FormatNumber(PlayerInfo[hitid][pHeadValue]));
SendFamilyMessage(8, COLOR_YELLOW, string);
new string1[128];
format(string1, sizeof(string1), "Ai primit un contract pe numele lui %s (valoare: $%s) de la %s!", giveplayer, FormatNumber(PlayerInfo[hitid][pHeadValue]), sendername);
SCM(giveplayerid, -1, string1);
GoChase[giveplayerid] = hitid;
GetChased[hitid] = giveplayerid;
GotHit[hitid] = 1;
hitid = 0;
hitfound = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " The Contracted Person is offline, use Contracts in the Portable again !");
return 0;
}
}
else return SCM(playerid, -1, "Acest jucator nu este in Hitman Agency!");
}
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Acest asasin nu este online, sau nu este in Hitman Agency!");
return 0;
}
}
else if ((strcmp("Ranks", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Ranks")))
{
SendClientMessage(playerid, COLOR_YQLMX, "_________________Rang agenti: __________________");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[pMember] == 8||PlayerInfo[pLeader] == 8)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* %s | Rang: %d", giveplayer,PlayerInfo[pRank]);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
}
else if ((strcmp("Order", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Order")))
{
if(OrderReady[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "Ai comandat deja un pachet, du-te in fata usii HQ-ului pentru a-l primi!");
return 0;
}
tmp = strtok(text, idx);
if ((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
{
if(PlayerInfo[playerid][pRank] < 1) { SendClientMessage(playerid, COLOR_GREY, "Rangul tau este prea mic pentru a achizitiona acest pachet de arme!"); return 0; }
if(GetPlayerCash(playerid) > 4999)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai comandat pachetul 1 (5.000$), acesta va fi livrat in fata usii HQ-ului!");
OrderReady[playerid] = 1;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You can't afford that Package !");
return 0;
}
}
else if ((strcmp("2", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("2")))
{
if(PlayerInfo[playerid][pRank] < 2) { SendClientMessage(playerid, COLOR_GREY, "Rangul tau este prea mic pentru a achizitiona acest pachet de arme!"); return 0; }
if(GetPlayerCash(playerid) > 5999)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai comandat pachetul 2 (6.000$), acesta va fi livrat in fata usii HQ-ului!");
OrderReady[playerid] = 2;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You can't afford that Package !");
return 0;
}
}
else if ((strcmp("3", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("3")))
{
if(PlayerInfo[playerid][pRank] < 2) { SendClientMessage(playerid, COLOR_GREY, "Rangul tau este prea mic pentru a achizitiona acest pachet de arme!"); return 0; }
if(GetPlayerCash(playerid) > 5999)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai comandat pachetul 3 (6.000$), acesta va fi livrat in fata usii HQ-ului!");
OrderReady[playerid] = 3;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You can't afford that Package !");
return 0;
}
}
else if ((strcmp("4", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("4")))
{
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "Rangul tau este prea mic pentru a achizitiona acest pachet de arme!"); return 0; }
if(GetPlayerCash(playerid) > 7999)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai comandat pachetul 4 (8.000$), acesta va fi livrat in fata usii HQ-ului!");
OrderReady[playerid] = 4;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You can't afford that Package !");
return 0;
}
}
else if ((strcmp("5", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("5")))
{
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "Rangul tau este prea mic pentru a achizitiona acest pachet de arme!"); return 0; }
if(GetPlayerCash(playerid) > 7999)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai comandat pachetul 5 (8.000$), acesta va fi livrat in fata usii HQ-ului!");
OrderReady[playerid] = 5;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You can't afford that Package !");
return 0;
}
}
else if ((strcmp("6", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("6")))
{
if(PlayerInfo[playerid][pRank] < 4) { SendClientMessage(playerid, COLOR_GREY, "Rangul tau este prea mic pentru a achizitiona acest pachet de arme!"); return 0; }
if(GetPlayerCash(playerid) > 8499)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai comandat pachetul 6 (8.500$), acesta va fi livrat in fata usii HQ-ului!");
OrderReady[playerid] = 6;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You can't afford that Package !");
return 0;
}
}
else if ((strcmp("7", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("7")))
{
if(PlayerInfo[playerid][pRank] < 4) { SendClientMessage(playerid, COLOR_GREY, "Rangul tau este prea mic pentru a achizitiona acest pachet de arme!"); return 0; }
if(GetPlayerCash(playerid) > 8499)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai comandat pachetul 7 (8.500$), acesta va fi livrat in fata usii HQ-ului!");
OrderReady[playerid] = 7;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You can't afford that Package !");
return 0;
}
}
else
{
SendClientMessage(playerid, COLOR_YQLMX, "__________________ Available Packages __________________");
if(PlayerInfo[playerid][pRank] >= 1) { SendClientMessage(playerid, COLOR_GREY, "|(1) ($5000 ) Rang 1 - 5: Cutit, Desert Eagle, MP5, Shotgun"); }
if(PlayerInfo[playerid][pRank] >= 2) { SendClientMessage(playerid, COLOR_GREY, "|(2) ($6000 ) Rang 2 - 5: Cutit, Desert Eagle, M4, MP5, Shotgun"); }
if(PlayerInfo[playerid][pRank] >= 2) { SendClientMessage(playerid, COLOR_GREY, "|(3) ($6000 ) Rang 2 - 5: Cutit, Desert Eagle, AK47, MP5, Shotgun"); }
if(PlayerInfo[playerid][pRank] >= 3) { SendClientMessage(playerid, COLOR_GREY, "|(4) ($8000) Rang 3 - 5: Cutit, Desert Eagle, M4, MP5, Shotgun, Sniper"); }
if(PlayerInfo[playerid][pRank] >= 3) { SendClientMessage(playerid, COLOR_GREY, "|(5) ($8000) Rang 3 - 5: Cutit, Desert Eagle, AK47, MP5, Shotgun, Sniper"); }
if(PlayerInfo[playerid][pRank] >= 4) { SendClientMessage(playerid, COLOR_GREY, "|(6) ($8500) Rang 4 - 5: Cutit, Desert Eagle, M4, MP5, Shotgun, Sniper"); }
if(PlayerInfo[playerid][pRank] >= 4) { SendClientMessage(playerid, COLOR_GREY, "|(7) ($8500) Rang 4 - 5: Cutit, Desert Eagle, AK47, MP5, Shotgun, Sniper"); }
SendClientMessage(playerid, COLOR_YQLMX, "________________________________________________________");
return 0;
}
}
else if ((strcmp("Logout", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Logout")))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai inchis laptopul, si te-ai deconectat de la agentie!");
ConnectedToPC[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_YQLMX, "___ Hitman Agency ___");
SendClientMessage(playerid, COLOR_YELLOW2, "| - News");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Contracts");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Givehit");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Backup");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Order");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Ranks");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Logout");
SendClientMessage(playerid, COLOR_YELLOW2, "|");
SendClientMessage(playerid, COLOR_YQLMX, "________________00:00|");
return 0;
}
return 0;
}
if(CallLawyer[playerid] == 111)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("da", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("da")))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "** %s este in puscarie, si are nevoie de un avocat. Du-te in sectia de politie LSPD.", sendername);
SendJobMessage(2, TEAM_AZTECAS_COLOR, string);
SendJobMessage(2, TEAM_AZTECAS_COLOR, "* Cand ajungi in sectie, vorbeste cu un politist pentru a-ti da /accept lawyer!");
SendClientMessage(playerid, COLOR_LIGHTRED, "Un mesaj a fost trimis catre toti avocatii online, asteapta o confirmare!");
WantLawyer[playerid] = 0;
CallLawyer[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Nu este niciun avocat disponibil acum! Sentinta va fi ispasita!");
WantLawyer[playerid] = 0;
CallLawyer[playerid] = 0;
return 0;
}
}
if(TalkingLive[playerid] != 255)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pJob] == 6)
{
format(string, sizeof(string), "Reporter %s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
}
else
{
format(string, sizeof(string), "Intervievat %s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
}
return 0;
}
if(Mobile[playerid] != 255)
{
new idx;
tmp = strtok(text, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Spune (telefon): %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
//printf("callers line %d called %d caller %d",Mobile[Mobile[playerid]],Mobile[playerid],playerid);
if(Mobile[playerid] == 914)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Dispecer: Imi pare rau, dar nu inteleg mesajul dvs.");
return 0;
}
new turner[MAX_PLAYER_NAME];
new wanted[128];
GetPlayerName(playerid, turner, sizeof(turner));
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Dispecer: Am alertat un echipaj de ambulanta din orasul Los Santos!");
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Multumim pentru raportarea acestui incident");
format(wanted, sizeof(wanted), "Dispecer: Toate unitatile: Apelant: %s",turner);
SendTeamBeepMessage(1, TEAM_CYAN_COLOR, wanted);
format(wanted, sizeof(wanted), "Dispecer: Incident: %s",text);
SendTeamMessage(1, TEAM_CYAN_COLOR, wanted);
SendClientMessage(playerid, COLOR_GRAD2, "Dispecerul a inchis apelul.");
Mobile[playerid] = 255;
return 0;
}
if(Mobile[playerid] == 913)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "Dispecer: Imi pare rau, dar nu inteleg mesajul dvs.");
return 0;
}
if ((strcmp("no", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("no")))
{
new turner[MAX_PLAYER_NAME];
new wanted[128];
GetPlayerName(playerid, turner, sizeof(turner));
SendClientMessage(playerid, COLOR_DBLUE, "Dispecer: Am alertat toate echipajele de politie din orasul Los Santos.");
SendClientMessage(playerid, COLOR_DBLUE, "Multumim pentru raportarea acestei infractiuni!");
format(wanted, sizeof(wanted), "Dispecer: Toate unitatile APB: Reclamant: %s",turner);
SendEnemyMessage(TEAM_BLUE_COLOR, string);
format(wanted, sizeof(wanted), "Dispecer: Infractiune: %s, Suspect: Necunoscut",PlayerCrime[playerid][pAccusing]);
SendEnemyMessage(TEAM_BLUE_COLOR, string);
SendClientMessage(playerid, COLOR_GRAD2, "Dispecerul a inchis apelul.");
Mobile[playerid] = 255;
return 0;
}
new badguy;
//badguy = strval(tmp);
badguy = ReturnUser(tmp);
if (IsPlayerConnected(badguy))
{
if(badguy != INVALID_PLAYER_ID)
{
if (IsACop(badguy))
{
SendClientMessage(playerid, COLOR_DBLUE, "Dispecer: Nu incerca sa ne induci in eroare! Aceasta este o linie de urgenta!");
SendClientMessage(playerid, COLOR_GRAD2, "Dispecerul a inchis apelul.");
Mobile[playerid] = 255;
return 0;
}
if (WantedLevel[badguy] > 0)
{
SendClientMessage(playerid, COLOR_DBLUE, "Dispecer: Agentii de politie lucreaza deja la acest caz.");
SendClientMessage(playerid, COLOR_DBLUE, "Multumim pentru efortul de a raporta aceasta infractiune.");
SendClientMessage(playerid, COLOR_GRAD2, "Dispecerul a inchis apelul.");
Mobile[playerid] = 255;
return 0;
}
if (badguy == playerid)
{
SendClientMessage(playerid, COLOR_DBLUE, "Dispecer: Nu incerca sa ne induci in eroare! Aceasta este o linie de urgenta!");
SendClientMessage(playerid, COLOR_GRAD2, "Dispecerul a inchis apelul.");
Mobile[playerid] = 255;
return 0;
}
SendClientMessage(playerid, COLOR_DBLUE, "Dispecer: Am alertat toate echipajele de politie din orasul Los Santos.");
SendClientMessage(playerid, COLOR_DBLUE, "Multumim pentru raportarea acestei infractiuni.");
SetPlayerCriminal(badguy,playerid, PlayerCrime[playerid][pAccusing]);
if(WantedLevel[badguy] > 0) { } else { WantedLevel[badguy] += 2; }
SendClientMessage(playerid, COLOR_GRAD2, "Dispecerul a inchis apelul.");
Mobile[playerid] = 255;
return 0;
}//invalid id
return 0;
}//not connected
else
{
format(string, sizeof(string), "Dispecer: Acest nume (%s) nu exista in baza de date, sunteti sigur ca este scris corect?",tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
return 0;
}
}
if(Mobile[playerid] == 912)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry i dont understand?");
return 0;
}
strmid(PlayerCrime[playerid][pAccusing], text, 0, strlen(text), 255);
SendClientMessage(playerid, COLOR_DBLUE, "Police HQ: If you know the assailant's name or part of it say it now or just say no.");
Mobile[playerid] = 913;
return 0;
}
if(Mobile[playerid] == 911)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry i dont understand, police or paramedic?");
return 0;
}
else if ((strcmp("police", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("police")))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: I am patching you to Police HQ, please hold.");
Mobile[playerid] = 912;
SendClientMessage(playerid, COLOR_DBLUE, "Police HQ: Please give me a short description of the crime.");
return 0;
}
else if ((strcmp("paramedic", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("paramedic")))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: I am patching you to Paramedic HQ, please hold.");
Mobile[playerid] = 914;
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Dispatch: Please give me a short description of the Incident.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Sorry i dont understand, police or paramedic?");
return 0;
}
}
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"Theres nobody there");
}
return 0;
}
if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new Colors[] = { COLOR_WHITE, COLOR_YELLOW, COLOR_LIGHTGREEN, COLOR_LIGHTBLUE, TEAM_GROVE_COLOR, 0x008100AA };
SetPlayerChatBubble(playerid, text, Colors[random(sizeof(Colors))], 50.0, 10000);
}
if(GoIP(text))
{
new reclama[MAX_PLAYER_NAME];
GetPlayerName(playerid, reclama, sizeof(reclama));
format(string, sizeof(string), "ADMIN INFO: %s a primit kick de la Admin-Bot, motiv: Reclama",reclama);
SendClientMessageToAll(COLOR_LIGHTRED,string);
Kick(playerid);
return 1;
}
for(new i; i < sizeof(TLD); i++)
{
if(strfind(text, TLD, true) != -1)
{
if(strfind(text, "www.rgaming.ro", true) != -1 || strfind(text, "realgaming.ro", true) != -1 || strfind(text, "rgaming.ro", true) != -1 || strfind(text, "rpg.rgaming.ro") != -1) break;
new reclama[MAX_PLAYER_NAME];
GetPlayerName(playerid, reclama, sizeof(reclama));
format(string, sizeof(string), "ADMIN INFO: %s a primit kick de la Admin-Bot, motiv: Reclama",reclama);
SendClientMessageToAll(COLOR_LIGHTRED,string);
Kick(playerid);
return 1;
}
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s spune: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
printf("[DEBUG]: #OnPlayerText");
return 1;
}