19.06.2014, 09:49
Hello I was get the error array index of bounds accesing element at negative index -1 that is in this command. thanks
pawn Код:
CMD:p(playerid,params[])
{
new x = -1;
foreach(Player,i)
{
if(RazgovaraSa[i] && i != playerid) x = i;
}
new ime[128],string[128];
RPIme(playerid,ime);
SCM(x,COLOR_GRAD2,"Javio se.");
format(string,sizeof(string),"%s se javio na mobitel.",ime);
RazgovaraSa[playerid] = ZoveGa[playerid];
RazgovaraSa[ZoveGa[playerid]] = PozivZa[ZoveGa[playerid]];
ProxDetector(10.0,playerid,string,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA,LJUBICASTA);
NaplatiPoziv[RazgovaraSa[playerid]] = SetTimerEx("UzmiZaPoziv",Min(1),true,"d",RazgovaraSa[playerid]);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
return 1;
}