[Pomoc] Problem sa /call i /pickup

Započeo Bugi, Jun 13, 2013, 16:57:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Ma moja od zirou(0)
Detaljan opis problema: Pa kad kucam /call i to sve lepo bude i ovaj se javi i to al njemu ne stize sta pisem niti meni stize sta on pise odnosno govori :P moze li neko to da mi sredi evo komandi i da kada pricaju na telefon pise [Telefon] Babaroga_Jebemliga kaze: de si ? Na primer tako nes :D

Deo skripte:
CMD:pickup(playerid,params[])
{
            new sendername[MAX_PLAYER_NAME];
            new string[128];
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_WHITE, "Vec razgovarate sa nekim.");
return 1;
}
foreach (Player, i)
{
if(Mobile[i] == playerid)
{
Mobile[playerid] = i;
SendClientMessage(i,  COLOR_WHITE, "{FFFF00}[LZ|MOBILNI]{AFAFAF} Javio se.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s se javio na telefon.", sendername);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
RingTone[playerid] = 0;
}
}
return 1;
}
CMD:hangup(playerid,params[])
{
            new caller = Mobile[playerid];
if(IsPlayerConnected(caller))
{
    if(caller != INVALID_PLAYER_ID)
    {
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller,  COLOR_WHITE, "[INFO] Prekinuo je.");
CellTime[caller] = 0;
CellTime[playerid] = 0;
SendClientMessage(playerid,  COLOR_WHITE, "[INFO] Prekinuli ste.");
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
RingTone[playerid] = 0;
}
}
}
SendClientMessage(playerid,  COLOR_WHITE, "[INFO] Telefon vam je u dzepu.");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
return 1;
}
CMD:call(playerid,params[])
{
new sendername[MAX_PLAYER_NAME];
new giveplayerid;
new phonenumb,string[128];
if(sscanf(params,"i",phonenumb)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ] {AFAFAF}Koriscenje : /pozovi [broj telefona]");
if(PlayerInfo[playerid][pBrojmoba] == 0) return SendClientMessage(playerid, COLOR_WHITE, "  Nemate telefon !");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s je izvadio mobilni.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
    if(phonenumb == PlayerInfo[playerid][pBrojmoba])
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ]{AFAFAF} Zauzeto je...");
return 1;
}
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ]{AFAFAF} Vec zovete...");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pBrojmoba] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid; //caller connecting
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
    {
    SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ]{AFAFAF} Igracev Telefon je iskljucen!");
    return 1;
}
if (Mobile[giveplayerid] == 255)
{
format(string, sizeof(string), "{FFFF00}[LZ]{AFAFAF} Zvoni vam telefon {FFFFFF}|{FFFF00} Poziva vas - %s ", sendername);
SendClientMessage(giveplayerid, 0x00D900C8, string);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
RingTone[giveplayerid] = 10;
format(string, sizeof(string), "%s-u zvoni mobilni", sendername);
SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ] {AFAFAF}Koristite 'T' kako biste pricali, a da prekinete /hangup");
ProxDetector(30.0, i, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
CellTime[playerid] = 1;
return 1;
}
}
}
}
}
}
return 1;
}


Neke slike/video za lakse dobijanje pomoci: STACE TI :D
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Probaj CMD:pickup(playerid,params[])
{
            new sendername[MAX_PLAYER_NAME];
            new string[128];
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_WHITE, "Vec razgovarate sa nekim.");
return 1;
}
foreach (Player, i)
{
if(Mobile[i] == playerid)
{
Mobile[playerid] = i;
SendClientMessage(i,  COLOR_WHITE, "{FFFF00}[LZ|MOBILNI]{AFAFAF} Javio se.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s se javio na telefon.", sendername);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
RingTone[playerid] = 0;
}
}
return 1;
}
CMD:hangup(playerid,params[])
{
            new caller = Mobile[playerid];
if(IsPlayerConnected(caller))
{
    if(caller != INVALID_PLAYER_ID)
    {
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller,  COLOR_WHITE, "[INFO] Prekinuo je.");
CellTime[caller] = 0;
CellTime[playerid] = 0;
SendClientMessage(playerid,  COLOR_WHITE, "[INFO] Prekinuli ste.");
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
RingTone[playerid] = 0;
}
}
}
SendClientMessage(playerid,  COLOR_WHITE, "[INFO] Telefon vam je u dzepu.");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
return 1;
}
CMD:call(playerid,params[])
{
new sendername[MAX_PLAYER_NAME];
new giveplayerid;
new phonenumb,string[128];
if(sscanf(params,"i",phonenumb)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ] {AFAFAF}Koriscenje : /pozovi [broj telefona]");
if(PlayerInfo[playerid][pBrojmoba] == 0) return SendClientMessage(playerid, COLOR_WHITE, "  Nemate telefon !");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s je izvadio mobilni.", sendername);
ProxDetector(30.0, playerid, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
    if(phonenumb == PlayerInfo[playerid][pBrojmoba])
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ]{AFAFAF} Zauzeto je...");
return 1;
}
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ]{AFAFAF} Vec zovete...");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pBrojmoba] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid; //caller connecting
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
    {
    SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ]{AFAFAF} Igracev Telefon je iskljucen!");
    return 1;
}
if (Mobile[giveplayerid] == 255)
{
format(string, sizeof(string), "{FFFF00}[LZ]{AFAFAF} Zvoni vam telefon {FFFFFF}|{FFFF00} Poziva vas - %s ", sendername);
SendClientMessage(giveplayerid, 0x00D900C8, string);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
RingTone[giveplayerid] = 10;
format(string, sizeof(string), "%s-u zvoni mobilni", sendername);
SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}[LZ] {AFAFAF}Koristite 'T' kako biste pricali, a da prekinete /hangup");
ProxDetector(30.0, i, string, LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
CellTime[playerid] = 1;
                                                        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
return 1;
}
}
}
}
}
}
return 1;

Zahvaljujuci Yui_Sangu moze lock :D nebitno kako al pomogao je :D
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).