CMD:at(playerid)
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, -1, "Vocк nгo pode falar, pois foi calado");
return true;
}
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк jб estб em uma ligaзгo.");
return true;
}
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Mobile[i] == playerid)
{
Mobile[playerid] = i; //caller connecting
SendClientMessage(i, COLOR_GRAD2, "Atendeu o celular.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s atendeu o celular.", NomePlayer(playerid));
SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
RingTone[playerid] = 0;
}
}
return true;
}
public OnPlayerText(playerid, text[])
{
new string[256],
tmp_text[256];
if(Mobile[playerid] != 255)
{
new idx;
tmp_text = 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);
SendClientMessageInRange(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
format(string, sizeof string, "((Celular %s para %s: %s))", NomePlayer(playerid), NomePlayer(Mobile[playerid]), text);
SendGrampoMessage(playerid, string);
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"Ninguйm lб...");
}
return 0;
}
if(realchat)
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, -1, "Vocк nao esta logado. USE: /logar.");
return 0;
}
format(string, sizeof(string), "%s diz: %s", NomePlayer(playerid), text);
SendClientMessageInRange(35.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 35.0, 10000);
return 0;
}
return 0;
}
CMD:ligar(playerid, params[])
{
new string[128];
if(PlayerInfo[playerid][pMuted] == 1)
return SendClientMessage(playerid, 0xA92BF6F6, "Vocк nao pode falar, pois foi calado");
if(PlayerInfo[playerid][pJailed] == 9)
return SendClientMessage(playerid,COLOR_GRAD1,"Vocк nao pode usar este comando nas Celas da Administracao!");
if(PlayerInfo[playerid][pJailed] != 0)
return SendClientMessage(playerid,COLOR_YELLOW,"Vocк nao pode usar celular na cadeia!");
new phonenumb;
if(sscanf(params, "d", phonenumb))
return SendClientMessage(playerid, COLOR_GRAD2, "USE: /ligar [Telefone]");
if(PlayerInfo[playerid][pPnumber] == 0)
return SendClientMessage(playerid, COLOR_GRAD2, "Voce nao tem um celular");
if(phonenumb == 000)
return SendClientMessage(playerid, COLOR_YELLOW ,"SMS: BUUUUU!!, enviou: Agencia Telefonica (555)");
if(phonenumb == 0)
return SendClientMessage(playerid, COLOR_YELLOW, "Este nъmero estб ocupado...");
if(phonenumb == PlayerInfo[playerid][pPnumber])
return SendClientMessage(playerid, COLOR_GRAD2, "Voce nao pode ligar para si mesmo");
if(IDCall[playerid] != 999)
return SendClientMessage(playerid, COLOR_GRAD2, "Voce ja esta em uma ligacao...");
format(string, sizeof(string), "(( %s pegou seu celular ))", NomePlayer(playerid));
SendClientMessageInRange(30.0, playerid, string, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF);
PlayerPlaySound(playerid, 3600, 0.0, 0.0, 0.0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
IDCall[playerid] = giveplayerid;
if(PhoneOnline[giveplayerid] > 0)
return SendClientMessage(playerid, COLOR_GREY, " O celular chamado esta desligado !");
if(IDCall[giveplayerid] == 999)
{
SendClientMessage(playerid, 0xFFFFFFFF, "Info: Digite no chat para falar no celular.");
SendClientMessage(playerid, 0xFFFFFFFF, "Info: Para desligar seu telefone use /des.");
SendClientMessage(giveplayerid, COLOR_YELLOW, "Seu celular esta recebendo uma chamada, use: /at para atender.");
format(string, sizeof(string), "(( O telefone celular de: %s esta tocando ))", NomePlayer(i));
SendClientMessageInRange(30.0, i, string, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF);
PlayerPlaySound(giveplayerid, 23000, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 23000, 0.0, 0.0, 0.0);
}
else SendClientMessage(playerid, COLOR_YELLOW, "Este nъmero estб ocupado...");
}
}
return 1;
}
CMD:at(playerid)
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, -1, "Vocк nгo pode falar, pois foi calado");
return true;
}
if(IDCall[playerid] != 999)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк jб estб em uma ligaзгo.");
return true;
}
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IDCall[i] == playerid)
{
IDCall[playerid] = i; //caller connecting
SendClientMessage(i, COLOR_GRAD2, "Chama de voz iniciada... (Digite no chat para se comunicar)");
format(string, sizeof(string), "(( %s atendeu uma chamada de voz ))", NomePlayer(playerid));
SendClientMessageInRange(30.0, playerid, string, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF);
}
}
return true;
}
for(new i = 0; i < MAX_PLAYERS; i++) { if(IDCall[i] == playerid) { IDCall[playerid] = i; //caller connecting SendClientMessage(i, COLOR_GRAD2, "Chama de voz iniciada... (Digite no chat para se comunicar)"); |
CMD:at(playerid) {
if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, 0xb30059FF, "[ATENЗГO]: {FFFFFF}Vocк nгo pode falar, pois foi silenciado.");
if(Mobile[playerid] != 255) return SendClientMessage(playerid, 0xb30059FF, "[ATENЗГO]: {FFFFFF}Atualmente vocк jб encontra-se em uma ligaзгo.");
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Mobile[i] == playerid)
{
Mobile[playerid] = i; //caller connecting
SendClientMessage(playerid, COLOR_GRAD2, "|CELULAR| Vocк atendeu a ligaзгo.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "( %s ) atendeu o celular.", NomePlayer(playerid));
SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
RingTone[playerid] = 0;
}
}
return true;
}
public OnPlayerText(playerid, text[]) {
new string[256],
tmp_text[256];
if(Mobile[playerid] != 255)
{
new idx;
tmp_text = 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);
SendClientMessageInRange(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
format(string, sizeof string, "((Celular %s para %s: %s))", NomePlayer(playerid), NomePlayer(Mobile[playerid]), text);
SendGrampoMessage(playerid, string);
}
} else {
SendClientMessage(playerid, COLOR_YELLOW,"Ninguйm lб...");
}
return true;
}
if(realchat)
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, 0xb30059FF, "[ATENЗГO]: {FFFFFF}Vocк nao esta logado. USE: /logar.");
format(string, sizeof(string), "%s diz: %s", NomePlayer(playerid), text);
SendClientMessageInRange(35.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 35.0, 10000);
return true;
}
return 0;
}
CMD:at(playerid)
{
if(PlayerInfo[playerid][pMuted] == 1)
return SendClientMessage(playerid, -1, "Voce nao pode falar, pois foi calado");
if(IDCall[playerid] != 999)
return SendClientMessage(playerid, COLOR_GRAD2, "Voce ja esta em uma ligacao.");
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PhoneID[playerid] == i)
{
IDCall[playerid] = i; //caller connecting
SendClientMessage(i, COLOR_GRAD2, "Chama de voz iniciada... (Digite no chat para se comunicar)");
format(string, sizeof(string), "(( %s atendeu uma chamada de voz ))", NomePlayer(playerid));
SendClientMessageInRange(30.0, playerid, string, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF, 0x66CDAAFF);
}
}
return 1;
}