13.05.2012, 18:55
Eae pessoal,beleza ?
Eu peguei um sistema de orelhao,mas o fio do telefeno й infinito.и assim vc digita /orelhao [numero] e pode ir pro outro lado do mapa que a chamada continua,e varias pessoas pode usar ao mesmo tempo.Resumindo: como coloco limite de distancia e 1 pessoa por vez ?segue o comando do orelhao (se precisar de alguma outra linha eu posto)
Obrigado a todos.
Eu peguei um sistema de orelhao,mas o fio do telefeno й infinito.и assim vc digita /orelhao [numero] e pode ir pro outro lado do mapa que a chamada continua,e varias pessoas pode usar ao mesmo tempo.Resumindo: como coloco limite de distancia e 1 pessoa por vez ?segue o comando do orelhao (se precisar de alguma outra linha eu posto)
pawn Код:
if(strcmp(cmd, "/orelhao", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(1.7, playerid,1535.5697,-1637.5358,13.5469) || PlayerToPoint(1.7, playerid,1710.8175,-1605.0188,13.5469) || PlayerToPoint(1.7, playerid,1808.1926,-1598.6720,13.5469) || PlayerToPoint(1.7, playerid,1611.2460,-1713.0765,13.5469) || PlayerToPoint(1.7, playerid,1362.9312,-1751.3467,13.5244) || PlayerToPoint(1.7, playerid,1804.5630,-1167.7408,23.8281) || PlayerToPoint(1.7, playerid,814.5628,-1355.5433,13.5414) ||
PlayerToPoint(1.7, playerid,839.7822,-1339.5476,7.1719) || PlayerToPoint(1.7, playerid,522.3236,-1515.9530,14.5936) || PlayerToPoint(1.7, playerid,523.9922,-1525.5927,14.7482) || PlayerToPoint(1.7, playerid,547.3288,-1498.3148,14.4988) || PlayerToPoint(1.7, playerid,637.4054,-1228.4910,17.8721) || PlayerToPoint(1.7, playerid,356.4761,-1365.3461,14.4760) ||
PlayerToPoint(1.7, playerid,338.9698,-1397.1982,14.2238) || PlayerToPoint(1.7, playerid,248.2463,-1448.8539,13.5899) || PlayerToPoint(1.7, playerid,2232.8149,-1165.7214,25.8906) || PlayerToPoint(1.7, playerid,2219.9551,-1154.7574,1025.7969)
|| PlayerToPoint(1.7, playerid,1723.9048,-1720.7859,13.5437) || PlayerToPoint(1.7, playerid,1720.4819,-1720.9020,13.5442))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /orelhao [Nє TELEFONE]");
return true;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s disca algum numero no telefone.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new phonenumb = strval(tmp);
if(phonenumb == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб ligando para ninguйm.");
return true;
}
if(phonenumb == PlayerInfo[playerid][pPnumber])
{
SendClientMessage(playerid, COLOR_GRAD2, "Voce nгo pode ligar para si mesmo.");
return true;
}
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Voce ja estб em uma ligaзгo.");
return true;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "O nъmero chamado estб fora de area,ou desligado.");
return true;
}
if (Mobile[giveplayerid] == 255)
{
format(string, sizeof(string), "Seu celular estб tocando (/At) Chamando: %s", PlayerName(playerid));
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
RingTone[giveplayerid] = 10;
format(string, sizeof(string), "O celular de %s,estб tocando.", PlayerName(playerid));
PlayerPlaySound(giveplayerid, 1142, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 1142, 0.0, 0.0, 0.0);
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_MSG, "Use 'T' para falar, digite /des para desligar");
CellTime[playerid] = 1;
SBizzInfo[2][sbTill] += 500;
ExtortionSBiz(2, 500);
return true;
}
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, "O nъmero chamado estб ocupado.");}
}
return true;
}