14.05.2012, 03:04
Queria que o chat aparecesse so para quem estivesse proximo um do outro
PHP код:
public OnPlayerText(playerid, text[])
{
new giver[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new tmp[128];
new string[360];
new giveplayerid;
PlayerInactivity[playerid] = 0;
//SpamProtection(playerid);
if(TentouDivulgar(text))
{
if(cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,PlayerName(playerid),text);
ABroadCast(COLOR_YELLOW,string,1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return 0;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Vocк nгo pode falar, vocк foi calado");
return 0;
}
if(SelectChar[playerid] == 255)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("Proximo", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Proximo")))
{
switch (SelectCharID[playerid])
{
case 1: //Policia Militar
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 280); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 280; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 281); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 281; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 282); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 282; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 265); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 265; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 267); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 267; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 246); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 246; }
}
case 2: //B.O.P.E
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 285; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 298); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 298; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 285; }
}
case 3: //Exйrcito
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 287); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 287; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 191); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 191; }
}
case 4: //SAMU
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 91; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 279; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 277); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 277; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 276); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 276; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 275); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 275; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 279; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 274); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 274; }
}
case 5: //Varrios Los Aztecas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 116); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 116; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 115); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 115; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 114); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 114; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 41); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 41; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
}
case 6: //Hamas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 122); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 122; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 272); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 272; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 131); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 131; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 128); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 128; }
}
case 7: //Prefeito
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 164); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 164; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 163); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 163; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 17; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 141); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 141; }
}
case 8: //Hitman Agency
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 166); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 166; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 165); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 165; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 127); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 127; }
}
case 9: //Reporteres
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 188); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 188; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 187); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 187; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
}
case 10: //Taxistas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 255); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 255; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 219); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 219; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 253); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 253; }
}
case 11: //Policia federal
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 224); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 224; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 286); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 286; }
}
case 12: //Mafia CN
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 17; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 43); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 43; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 46); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 46; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 98); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 98; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 111; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 223); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 223; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 126); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 126; }
}
case 13: //Yakuza
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 203); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 203; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 204); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 204; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 117; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 118; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 169); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 169; }
}
case 14: //Groove
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 105); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 105; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 106); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 106; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 107); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 107; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 271); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 271; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 195); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 195; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 269); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 269; }
}
case 15: //Al'qaeda
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 30); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 30; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 47); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 47; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 48); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 48; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 192); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 192; }
}
case 16: //Policia Civil
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 59); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 59; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 124); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 124; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 76); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 76; }
}
case 17: //Ballas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 102); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 102; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 103); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 103; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 104); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 104; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 40; }
}
case 18: //Vagos
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 108); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 108; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 109); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 109; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 110); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 110; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 91; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 85); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 85; }
}
case 19: //Comando Vermelho
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 19); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 19; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 170); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 170; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 40; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 193); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 193; }
}
case 20: //Sons of Anarchy
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 247); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 247; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 248); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 248; }
}
case 21: //DRIFTERS
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 101); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 101; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 293); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 293; }
}
case 22: //TRIADS
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 117; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 118; }
}
case 23: //FARC
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 111; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 112); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 112; }
}
}
return 0;
}
else if ((strcmp("Confirma", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Confirma")))
{
if(IsAtClothShop(playerid))
{
PlayerInfo[playerid][pSkin] = ChosenSkin[playerid];
SelectCharPlace[playerid] = 0;
SelectCharID[playerid] = 0;
SelectChar[playerid] = 0;
return 0;
}
if(ChangePos2[playerid][1] == 1)
{
PlayerInfo[playerid][pSkin] = ChosenSkin[playerid];
SetPlayerInterior(playerid, ChangePos2[playerid][0]);
SetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
ChangePos2[playerid][1] = 0;
return 0;
}
PlayerInfo[playerid][pSkin] = ChosenSkin[playerid];
//PlayerInfo[playerid][pSpawn] = 0;
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
gTeam[playerid] = PlayerInfo[playerid][pTeam];
SetPlayerToTeamColor(playerid);
MedicBill[playerid] = 0;
SpawnPlayer(playerid);
SelectCharPlace[playerid] = 0;
SelectCharID[playerid] = 0;
SelectChar[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, TEAM_VAGOS_COLOR, "* Use 'Proximo', ou 'Confirma'.");
return 0;
}
}
if(MarriageCeremoney[playerid] > 0)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("sim", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("sim")))
{
if(GotProposedBy[playerid] < 999)
{
if(IsPlayerConnected(GotProposedBy[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Padre: %s Vocк aceita %s como sua amada esposa? (Digite 'sim', qualquer outra coisa cancela o casamento).", giveplayer,PlayerName(playerid));
SendClientMessage(GotProposedBy[playerid], COLOR_WHITE, string);
MarriageCeremoney[GotProposedBy[playerid]] = 1;
MarriageCeremoney[playerid] = 0;
GotProposedBy[playerid] = 999;
return true;
}
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), "Padre: %s e %s eu vos declaro Marido e Mulher, Pode Beijar a Noiva.", sendername, giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Padre: %s e %s eu vos declaro Marido e Mulher, Pode Beijar o Noivo.", giveplayer, PlayerName(playerid));
SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Noticia de Casamento: Temos um novo Casamento, %s e %s se casaram.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 1)
{
format(string, sizeof(string), "Padre: %s e %s eu os declaro Marido e Marido, Pode Beijar o Noivo.", sendername, giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Padre: %s e %s eu os declaro Marido e Marido, Pode Beijar o Noivo.", giveplayer, PlayerName(playerid));
SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Noticia de Casamento: Temos um novo Casamento Gay, %s e %s se casaram.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 2 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
{
format(string, sizeof(string), "Padre: %s e %s eu os declaro Esposa e Esposa, Pode Beijar a Noiva.", sendername, giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Padre: %s e %s eu os declaro Esposa e Esposa, Pode Beijar a Noiva", giveplayer, PlayerName(playerid));
SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Noticia de Casamento: Temos um novo Casamento Lesbico, %s e %s se casaram.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
//MarriageCeremoney[ProposedTo[playerid]] = 1;
MarriageCeremoney[ProposedTo[playerid]] = 0;
MarriageCeremoney[playerid] = 0;
format(string, sizeof(string), "%s", PlayerName(playerid));
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);
GivePlayerMoney(playerid, - 100);
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 true;
}
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), "* Vocк deseja se casar com %s, Se Quizer Digite 'sim'.",giveplayer);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s quer casar com Vocк, um 'sim' foi dito.",PlayerName(playerid));
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), "* Vocк deseja se casar com %s, Se Quizer Digite 'sim'.",giveplayer);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s quer casar com Vocк, um 'sim' foi dito.",PlayerName(playerid));
SendClientMessage(ProposedTo[playerid], COLOR_YELLOW, string);
return 0;
}
else
{
MarriageCeremoney[playerid] = 0;
ProposedTo[playerid] = 999;
return 0;
}
}
}
return 0;
}
if(ConnectedToPC[playerid] == 255)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("Contratos", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Contratos")))
{
if(GetPlayerOrg(playerid) == 8) { FH = 1; }
if(GetPlayerOrg(playerid) == 22) { FK = 1; }
SearchingHit(playerid);
return 0;
}
else if ((strcmp("noticias", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("noticias")))
{
new x_nr[256];
x_nr = strtok(text, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Noticia da agencia dos Assasinos __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USE: noticias [Numero] ou noticias apagar [Numero] ou noticias apagar tudo");
format(string, sizeof(string), "1: %s :: Assasino: %s", News[hAdd1], News[hContact1]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "2: %s :: Assasino: %s", News[hAdd2], News[hContact2]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "3: %s :: Assasino: %s", News[hAdd3], News[hContact3]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "4: %s :: Assasino: %s", News[hAdd4], News[hContact4]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "5: %s :: Assasino: %s", News[hAdd5], News[hContact5]);
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________________|");
return 0;
}//lets start
if(strcmp(x_nr,"1",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Ja tem uma noticia nesse numero, apague primeiro!"); return 0; }
if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 3+ para escrever uma noticia!"); return 0; }
if(News[hTaken1] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " Texto da noticia muito curto!"); 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, "* Vocк criou uma nova noticia na agencia dos Assasinos.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Slot 1 ocupado!");
return 0;
}
}
else if(strcmp(x_nr,"2",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Ja tem uma noticia nesse numero, apague primeiro!"); return 0; }
if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 3+ para escrever uma noticia!"); return 0; }
if(News[hTaken2] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " Texto da noticia muito curto!"); 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, "* Vocк criou uma nova noticia na agencia dos Assasinos.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Slot 2 ocupado!");
return 0;
}
}
else if(strcmp(x_nr,"3",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Ja tem uma noticia nesse numero, apague primeiro!"); return 0; }
if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 3+ para escrever uma noticia!"); return 0; }
if(News[hTaken3] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " Texto da noticia muito curto!"); 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, "* Vocк criou uma nova noticia na agencia dos Assasinos.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Slot 3 ocupado!");
return 0;
}
}
else if(strcmp(x_nr,"4",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Ja tem uma noticia nesse numero, apague primeiro!"); return 0; }
if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 3+ para escrever uma noticia!"); return 0; }
if(News[hTaken4] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " Texto da noticia muito curto !"); 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, "* Vocк criou uma nova noticia na agencia dos Assasinos.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Slot 4 ocupado!");
return 0;
}
}
else if(strcmp(x_nr,"5",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " Ja tem uma noticia nesse numero, apague primeiro!"); return 0; }
if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 3+ para escrever uma noticia!"); return 0; }
if(News[hTaken5] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, " Texto da noticia muito curto!"); 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, "* Vocк criou uma nova noticia na agencia dos Assasinos.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Slot 5 ocupado !");
return 0;
}
}
else if(strcmp(x_nr,"apagar",true) == 0)
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 4+ para apagar mensagens!");
return 0;
}
new string1[MAX_PLAYER_NAME];
new x_tel[256];
x_tel = strtok(text, idx);
if(!strlen(x_tel)) {
SendClientMessage(playerid, COLOR_WHITE, "USE: noticias apagar [Numero] ou noticias apagar tudo.");
return 0;
}
if(strcmp(x_tel,"1",true) == 0)
{
format(string, sizeof(string), "Nada"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
PlacedNews[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк apagou a noticia (1) da Agencia dos Assasinos.");
return 0;
}
else if(strcmp(x_tel,"2",true) == 0)
{
format(string, sizeof(string), "Nada"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
PlacedNews[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк apagou a noticia (2) da Agencia dos Assasinos.");
return 0;
}
else if(strcmp(x_tel,"3",true) == 0)
{
format(string, sizeof(string), "Nada"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
PlacedNews[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк apagou a noticia (3) da Agencia dos Assasinos.");
return 0;
}
else if(strcmp(x_tel,"4",true) == 0)
{
format(string, sizeof(string), "Nada"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
PlacedNews[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк apagou a noticia (4) da Agencia dos Assasinos.");
return 0;
}
else if(strcmp(x_tel,"5",true) == 0)
{
format(string, sizeof(string), "Nada"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
PlacedNews[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк apagou a noticia (5) da Agencia dos Assasinos.");
return 0;
}
else if(strcmp(x_tel,"tudo",true) == 0)
{
format(string, sizeof(string), "Nada"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
format(string, sizeof(string), "Nada"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
format(string, sizeof(string), "Nada"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
format(string, sizeof(string), "Nada"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
format(string, sizeof(string), "Nada"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Ninguem"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
PlacedNews[playerid] = 0;
PlacedNews[playerid] = 0;
PlacedNews[playerid] = 0;
PlacedNews[playerid] = 0;
PlacedNews[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк apagou todas as mensagens da agencia dos Assasinos.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USE: noticias apagar [Numero] ou noticias apagar tudo.");
return 0;
}
}
else { return 0; }
}
else if ((strcmp("darcont", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("darcont")))
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк precisa de cargo 4+ para dar contrato!");
return 0;
}
if(hitfound == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Nгo ha contratos, USE contratos em seu laptop primeiro!");
return 0;
}
tmp = strtok(text, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: darcont [ID/Nome]");
return 0;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(GetPlayerOrg(playerid) != GetPlayerOrg(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, " Esse Jogador nгo й um Assassino!");
return 0;
}
if(GoChase[giveplayerid] < 999)
{
SendClientMessage(playerid, COLOR_GREY, " Esse assasino ja possui um contrato!");
return 0;
}
if(IsPlayerConnected(hitid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giver, sizeof(giver));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Assasino %s, deu um contrato para %s matar: %s(ID:%d), por R$%d.", sendername, giver, giveplayer, hitid, PlayerInfo[hitid][pHeadValue]);
SendFamilyMessage(GetPlayerOrg(playerid), COLOR_YELLOW, string);
GoChase[giveplayerid] = hitid;
GetChased[hitid] = giveplayerid;
GotHit[hitid] = 1;
hitid = 0;
hitfound = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " O contrato saiu do servidor, USE contratos no seu laptop novamente!");
return 0;
}
}
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Esse nгo e um assasino ativo!");
return 0;
}
}
else if ((strcmp("membros", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("membros")))
{
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Membros da Agencia __________________|");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 22)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* %s: Cargo %d", giveplayer,PlayerInfo[i][pCargo]);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
}
else if ((strcmp("pedido", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("pedido")))
{
if(OrderReady[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
return 0;
}
tmp = strtok(text, idx);
if ((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
{
if(PlayerInfo[playerid][pCargo] < 1) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem cargo suficiente para pegar esse pacote!"); return 0; }
if(GetPlayerMoney(playerid) > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 1;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," Vocк nгo possui essa grana!");
return 0;
}
}
else if ((strcmp("2", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("2")))
{
if(PlayerInfo[playerid][pCargo] < 1) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem cargo suficiente para pegar esse pacote!"); return 0; }
if(GetPlayerMoney(playerid) > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 2;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," Vocк nгo possui essa grana!");
return 0;
}
}
else if ((strcmp("3", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("3")))
{
if(PlayerInfo[playerid][pCargo] < 1) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem cargo suficiente para pegar esse pacote!"); return 0; }
if(GetPlayerMoney(playerid) > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 3;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," Vocк nгo possui essa grana!");
return 0;
}
}
else if ((strcmp("4", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("4")))
{
if(PlayerInfo[playerid][pCargo] < 2) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem cargo suficiente para pegar esse pacote!"); return 0; }
if(GetPlayerMoney(playerid) > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 4;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," Vocк nгo possui essa grana!");
return 0;
}
}
else if ((strcmp("5", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("5")))
{
if(PlayerInfo[playerid][pCargo] < 2) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem cargo suficiente para pegar esse pacote!"); return 0; }
if(GetPlayerMoney(playerid) > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 5;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," Vocк nгo possui essa grana!");
return 0;
}
}
else if ((strcmp("6", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("6")))
{
if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem cargo suficiente para pegar esse pacote!"); return 0; }
if(GetPlayerMoney(playerid) > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 6;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," Vocк nгo possui essa grana!");
return 0;
}
}
else if ((strcmp("7", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("7")))
{
if(PlayerInfo[playerid][pCargo] < 3) { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo tem cargo suficiente para pegar esse pacote!"); return 0; }
if(GetPlayerMoney(playerid) > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Seu pacote foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 7;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," Vocк nгo possui essa grana!");
return 0;
}
}
else if ((strcmp("8", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("8")))
{
if(GanhouArmamento == GetPlayerOrg(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu Bфnus foi entregue a sua HQ, verifique na Caixa de Pacotes !");
OrderReady[playerid] = 8;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY," A sua organizaзгo nгo ganhou o Bфnus Especial por contratos concluidos!");
return 0;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "|__________________[ Pedidos Disponiveis ]__________________|");
if(PlayerInfo[playerid][pCargo] >= 1) { SendClientMessage(playerid, COLOR_GREY, "|(1) Cargo 1 - 6: Knife, Eagle, MP5, Shotgun"); }
if(PlayerInfo[playerid][pCargo] >= 2) { SendClientMessage(playerid, COLOR_GREY, "|(2) Cargo 2 - 6: Knife, Eagle, M4, MP5, Shotgun"); }
if(PlayerInfo[playerid][pCargo] >= 2) { SendClientMessage(playerid, COLOR_GREY, "|(3) Cargo 2 - 6: Knife, Eagle, AK47, MP5, Shotgun, Colete"); }
if(PlayerInfo[playerid][pCargo] >= 3) { SendClientMessage(playerid, COLOR_GREY, "|(4) Cargo 3 - 6: Knife, Eagle, M4, MP5, Shotgun, Sniper, Colete"); }
if(PlayerInfo[playerid][pCargo] >= 3) { SendClientMessage(playerid, COLOR_GREY, "|(5) Cargo 3 - 6: Knife, Eagle, AK47, MP5, Shotgun, Sniper, Colete"); }
if(PlayerInfo[playerid][pCargo] >= 4) { SendClientMessage(playerid, COLOR_GREY, "|(6) Cargo 4 - 6: Knife, Eagle, M4, MP5, Shotgun, Sniper, Colete"); }
if(PlayerInfo[playerid][pCargo] >= 4) { SendClientMessage(playerid, COLOR_GREY, "|(7) Cargo 4 - 6: Knife, Eagle, AK47, MP5, Shotgun, Sniper, Colete"); }
SendClientMessage(playerid, COLOR_LIGHTRED, "|(8) Bфnus: Knife, Eagle, AK47, MP5, Combat Shotgun, Sniper, Colete, e 100 mil.");
return 0;
}
}
else if ((strcmp("sair", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("sair")))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк desligou seu laptop e se desconectou de sua agencia.");
ConnectedToPC[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "|___ Agencia dos Assasinos ___|");
SendClientMessage(playerid, COLOR_YELLOW2, "|");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Noticias");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Contratos");
SendClientMessage(playerid, COLOR_YELLOW2, "| - DarCont");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Pedido");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Membros");
SendClientMessage(playerid, COLOR_YELLOW2, "| - Sair");
SendClientMessage(playerid, COLOR_WHITE, "|______________|00:00|");
return 0;
}
return 0;
}
if(CallAdvogado[playerid] == 111)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("sim", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("sim")))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "** %s estб na prisгo e precisa de um advogado, olhe /presos.", PlayerName(playerid));
SendEmpregoMessage(2, TEAM_AZTECAS_COLOR, string);
SendClientMessage(playerid, COLOR_LIGHTRED, "A Mensagem foi enviada para todos os advogados online, Por favor espere.");
WantAdvogado[playerid] = 0;
CallAdvogado[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Sua sentenзa foi iniciada.");
WantAdvogado[playerid] = 0;
CallAdvogado[playerid] = 0;
return 0;
}
}
if(TalkingLive[playerid] != 255)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMembro] == 4 || PlayerInfo[playerid][pLider] == 4)
{
format(string, sizeof(string), "Ao Vivo %s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
SetPlayerChatBubble(playerid, text, COLOR_AZULBB, 20.0, 10000);
}
else
{
format(string, sizeof(string), "Ao Vivo %s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
SetPlayerChatBubble(playerid, text, COLOR_AZULBB, 20.0, 10000);
}
return 0;
}
if(Mobile[playerid] != 255)
{
new idx;
tmp = strtok(text, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s diz (Celular): %s", sendername, text);
SetPlayerChatBubble(playerid, string, COLOR_AZULBB, 20.0, 10000);
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] == 191)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Denuncia: Desculpe, Nao Entendi");
return 0;
}
new turner[MAX_PLAYER_NAME];
new wanted[128];
GetPlayerName(playerid, turner, sizeof(turner));
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Denuncia: Temos alertado todas as unidades na бrea.");
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Obrigado por Relatar o Ocorrido");
format(wanted, sizeof(wanted), "Denuncia: Todas Unidades IA: Chamador: %s",turner);
SendFamilyMessage(1, TEAM_CYAN_COLOR, wanted);
format(wanted, sizeof(wanted), "Denuncia: %s",text);
SendFamilyMessage(1, TEAM_CYAN_COLOR, wanted);
SendClientMessage(playerid, COLOR_GRAD2, " Ninguem na linha...");
Mobile[playerid] = 255;
return 0;
}
if(Mobile[playerid] == 191)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGКNCIA: Desculpe eu nгo entendo");
return 0;
}
if ((strcmp("nao", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("nao")))
{
new turner[MAX_PLAYER_NAME];
new wanted[128];
GetPlayerName(playerid, turner, sizeof(turner));
SendClientMessage(playerid, COLOR_DBLUE, "COP: Alertamos todos as unidades perto do local.");
SendClientMessage(playerid, COLOR_DBLUE, "Obrigado por ter relatado o Ocorrido");
format(wanted, sizeof(wanted), "HQ: Todas as unidades: Denunciante: %s",turner);
SendFamilyMessage(1, COLOR_DBLUE, wanted);
format(wanted, sizeof(wanted), "HQ: Crime: %s, Suspeito: Desconhecido",PlayerCrime[playerid][pAccusing]);
SendFamilyMessage(1, COLOR_DBLUE, wanted);
SendClientMessage(playerid, COLOR_GRAD2, " Ninguйm na linha.....");
Mobile[playerid] = 255;
return 0;
}
new badguy;
//badguy = strval(tmp);
badguy = ReturnUser(tmp);
if (IsPlayerConnected(badguy))
{
if(badguy != INVALID_PLAYER_ID)
{
if (gTeam[badguy] == 2 || gTeam[badguy] == 1)
{
SendClientMessage(playerid, COLOR_DBLUE, "Polнcia HQ: Vocк terб que entrar em contato com os assuntos internos. Esta й uma linha de emergкncia");
SendClientMessage(playerid, COLOR_GRAD2, " Ninghem na linha...");
Mobile[playerid] = 255;
return 0;
}
if (WantedPoints[badguy] > 0)
{
SendClientMessage(playerid, COLOR_DBLUE, "Polнcia HQ: Unidades jб estгo atribuнdos a esse caso.");
SendClientMessage(playerid, COLOR_DBLUE, "Obrigado por denunciar este crime");
SendClientMessage(playerid, COLOR_GRAD2, " Ninguйmm na linha...");
Mobile[playerid] = 255;
return 0;
}
if (badguy == playerid)
{
SendClientMessage(playerid, COLOR_DBLUE, "Polнcia HQ: Esta linha e de emergencia.");
SendClientMessage(playerid, COLOR_GRAD2, " Ninguйmm na linha...");
Mobile[playerid] = 255;
return 0;
}
SendClientMessage(playerid, COLOR_DBLUE, "Polнcia HQ: Temos alertado todas as unidades na бrea.");
SendClientMessage(playerid, COLOR_DBLUE, "Obrigado por denunciar este crime");
SetPlayerCriminal(badguy,playerid, PlayerCrime[playerid][pAccusing]);
if(WantedPoints[badguy] > 0) { } else
{
WantedPoints[badguy] += 1;
SetPlayerWantedLevel(badguy, WantedPoints[badguy]);
}
SendClientMessage(playerid, COLOR_GRAD2, " Ninguйmm na linha...");
Mobile[playerid] = 255;
return 0;
}//invalid id
return 0;
}//not connected
else
{
format(string, sizeof(string), "Police HQ: Nenhuma informaзгo sobre %s, o nome citado esta correto?",tmp);
SendClientMessage(playerid, COLOR_DBLUE, string);
return 0;
}
}
if(Mobile[playerid] == 912)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCIA: Desculpe, nao entendi.");
return 0;
}
strmid(PlayerCrime[playerid][pAccusing], text, 0, strlen(text), 255);
SendClientMessage(playerid, COLOR_DBLUE, "Polнcia HQ: Se vocк souber o nome do assaltante ou de parte dele, me fale, ou simplesmente dizer nгo");
Mobile[playerid] = 913;
return 0;
}
if(Mobile[playerid] == 190)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCIA: Desculpe nгo entendo... Policia ou SAMU?");
return 0;
}
else if ((strcmp("policia", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("policia")))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCIA: Vocк optou por Policia, Espere.");
Mobile[playerid] = 912;
SendClientMessage(playerid, COLOR_DBLUE, "Polнcia HQ: Por favor me dк uma breve descriзгo do crime.");
return 0;
}
else if ((strcmp("SAMU", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("SAMU")))
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCIA: Vocк optou por SAMU, Espere.");
Mobile[playerid] = 914;
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Denuncia: Por favor me dк uma breve descriзгo do Incidente.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCIA: Desculpe nгo entendo... Policia ou SAMU?");
return 0;
}
}
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"Ninguйm lб");
}
return 0;
}
if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Mascarado diz: %s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, text, COLOR_AZULBB, 20.0, 10000);
//ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
}
else
{
format(string, sizeof(string), "%s diz: %s", PlayerName(playerid), text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, text, COLOR_AZULBB, 20.0, 10000);
//ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,0,1,1,1,1);
}
return 0;
}
return true;
}