29.01.2019, 15:40
PHP код:
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;
}
PHP код:
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;
}