05.10.2013, 04:07
pawn Код:
if(strcmp(cmd, "/aovivo", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMembro] == 9 || PlayerInfo[playerid][pLider] == 9)
{
if(TalkingLive[playerid] != 255)
{
MSGPLAYER(playerid, COLOR_LIGHTBLUE, "* A Conversa AoVivo Terminou.");
MSGPLAYER(TalkingLive[playerid], COLOR_LIGHTBLUE, "* A Conversa AoVivo Terminou.");
Controle(playerid, 1);
Controle(TalkingLive[playerid], 1);
TalkingLive[TalkingLive[playerid]] = 255;
TalkingLive[playerid] = 255;
return 1;
}
if(PlayerInfo[playerid][pNewsSkill] < 0)
{
MSGPLAYER(playerid, COLOR_GREY, " Seu Cargo й baixo para falar com alguem AoVivo !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
MSGPLAYER(playerid, COLOR_GRAD1, "USE: /aovivo [id]");
return 1;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(5.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo pode falar AoVivo com vocк mesmo!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк ofereceu a %s para ter uma conversa AoVivo.", giveplayer);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s Vocк tem uma oferta para conversas ao vivo, Digite (/aceitar aovivo) para aceitar.", sendername);
MSGPLAYER(giveplayerid, COLOR_LIGHTBLUE, string);
LiveOffer[giveplayerid] = playerid;
}
else
{
MSGPLAYER(playerid, COLOR_GREY, " Vocк esta longe deste player !");
return 1;
}
}
}
else
{
MSGPLAYER(playerid, COLOR_GREY, " ID/Nick - Invalido !");
return 1;
}
}
else
{
MSGPLAYER(playerid, COLOR_GREY, " Vocк nao e um reporter !");
}
}//not connected
return 1;
}