05.02.2014, 17:42
pawn Код:
if(strcmp(cmd, "/dm", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /dm [id]");
return 1;
}
//new idperto = GetClosestPlayer(playerid);
new acusado = ReturnUser(tmp);
if(IsPlayerConnected(idperto))
{
if(acusado != INVALID_PLAYER_ID)
{
if(GetDistanceBetweenPlayers(playerid,acusado) < 10)
{
format(string, sizeof(string), "ATENЗГO: %s[%d] ACUSOU %s[%d] DE ESTAR A FAZER DM, /TV %d RБPIDO!", PlayerName(playerid),playerid,PlayerName(acusado),acusado,playerid);
if(PlayerInfo[playerid][pVIP] < 1)
{
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "O seu aviso de DeathMatch foi enviado para os administradores online!");
}
else if(PlayerInfo[playerid][pVIP] == 1)
{
ABroadCast(COLOR_PM,string,1);
SendClientMessage(playerid, COLOR_PM, "O seu aviso de DeathMatch foi enviado para os administradores online!");
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
ABroadCast(COLOR_ROSA,string,1);
SendClientMessage(playerid, COLOR_ROSA, "O seu aviso de DeathMatch foi enviado para os administradores online!");
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"Nгo hб ninguйm perto de vocк!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"Nгo hб ninguйm perto de vocк!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"Nгo hб ninguйm perto de vocк!");
return 1;
}
}
return 1;
}