11.07.2013, 20:59
Код:
error 010: invalid function or declaration
Код:
public OtherTimer()
{
new Float:maxspeed = 175.0;
new plname[MAX_PLAYER_NAME];
new string[256];
new Float:oldposx, Float:oldposy, Float:oldposz;
foreach (Player, i)
{
if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
{
new loginname[64];
new loginstring[512];
GetPlayerName(i,loginname,64);
format(loginstring,sizeof(loginstring),"{FFFFFF}Dobredojdovte gospodine %s\n{0049FF}>{FFFFFF}Vasiot akaunt e pronajden i uspesno vcitan\n vnesete lozinka za da se logirate\n\n{0049FF}>{FFFFFF}Otkako ke se logirate pocituvajte gi RP Pravilata\n vo sprotivno ke bidete kaznen od admin\n\n{0049FF}>{FFFFFF}UltrasGaming vi posakuva mnogu drizenje i zabava\n{0049FF}>{FFFFFF}Dokolku imate problem posetete{F3FF02} www.ultrasgaming12.freeiz.com\n\n{FFFFFF}Vkupno obidi:{F81414}1",loginname);
ShowPlayerDialog(i,12347,DIALOG_STYLE_PASSWORD,"{F81414}Logiranje",loginstring,"Vlezi","Ilezi");
}
if(GetPlayerState(i) == 2)
{
GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
if(TelePos[i][5] > 550.0)
{
TelePos[i][0] = 0.0;
TelePos[i][1] = 0.0;
}
if(TelePos[i][0] != 0.0)
{
new Float:xdist = TelePos[i][3]-TelePos[i][0];
new Float:ydist = TelePos[i][4]-TelePos[i][1];
new Float:sqxdist = xdist*xdist;
new Float:sqydist = ydist*ydist;
new Float:distance = (sqxdist+sqydist)/31;
if(gSpeedo[i] == 2)
{
if(distance <10)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
}
if(distance > 10 && distance < 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
}
if(distance > 100)
{
format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
}
GameTextForPlayer(i, string, 2000, 5);
}
if(distance > maxspeed && PlayerInfo[i][pAdmin] < 1)
{
new tmpcar = GetPlayerVehicleID(i);
if(!IsAPlane(tmpcar))
{
GetPlayerName(i, plname, sizeof(plname));
format(string, 256, "AdmWarning: [%d]%s %.0f mph",i,plname,distance);
ABroadCast(COLOR_YELLOW,string,1);
}
}
}
if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
{
TelePos[i][0] = TelePos[i][3];
TelePos[i][1] = TelePos[i][4];
}
}
if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
{
new house = PlayerInfo[i][pLocal];
GetPlayerPos(i, oldposx, oldposy, oldposz);
if(oldposz != 0.0)
{
if(oldposz < 600.0)
{
if(house > 10000)
{
new tmpcar = GetPlayerVehicleID(i);
if (!PlayerToPoint(6, i,1040.6,-1021.0,31.7) && house == 10001 ||!PlayerToPoint(6, i,-2720.5,217.5,4.1) && house == 10002 ||!PlayerToPoint(6, i,2644.6,-2044.9,13.3) && house == 10003)
{
if (GetPlayerState(i) == 2)
{
SetVehiclePos(tmpcar, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
SetVehicleZAngle(tmpcar, HouseCarSpawns[tmpcar-1][3]);
}
else
{
SetPlayerPos(i, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
}
new oldcash = gSpentCash[i];
new Total = GetPlayerMoney(i) - oldcash;
printf("Total %d = GetPlayerMoney(playerid) %d - oldcash %d",Total,GetPlayerMoney(i),oldcash);
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(string,128,"<< %s has left the homemodshop with $%d >>",name,Total);
PayLog(string);
gSpentCash[i] = 0;
TelePos[i][0] = 0.0;
TelePos[i][1] = 0.0;
PlayerInfo[i][pLocal] = 255;
SetPlayerInterior(i,0);
PlayerInfo[i][pInt] = 0;
Spectate[i] = 255;
}
}
if(house == 241)//City Hall
{
SetPlayerInterior(i,0);
SetPlayerPos(i,-2162.2554,-2385.9541,30.6250);
PlayerInfo[i][pInt] = 0;
PlayerInfo[i][pLocal] = 255;
}
if(house == 242)
{
SetPlayerInterior(i,0);
SetPlayerPos(i,1073.0619,-344.5148,73.9922);
PlayerInfo[i][pInt] = 0;
PlayerInfo[i][pLocal] = 255;
}
if(house >= 99 && house != 10000)
{
SetPlayerPos(i, BizzInfo[house-99][bEntranceX], BizzInfo[house-99][bEntranceY],BizzInfo[house-99][bEntranceZ]); // Warp the player
PlayerInfo[i][pLocal] = 255;
SetPlayerInterior(i,0);
PlayerInfo[i][pInt] = 0;
}
else if(house < 99 && house != 10000)
{
SetPlayerPos(i, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]); // Warp the player
PlayerInfo[i][pLocal] = 255;
SetPlayerInterior(i,0);
PlayerInfo[i][pInt] = 0;
}
}
}
}
if(CellTime[i] > 0)
{
if (CellTime[i] == cchargetime)
{
CellTime[i] = 1;
if(Mobile[Mobile[i]] == i)
{
CallCost[i] = CallCost[i]+callcost;
}
}
CellTime[i] = CellTime[i] +1;
if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
{
if(IsPlayerConnected(Mobile[i]))
{
new called[MAX_PLAYER_NAME];
GetPlayerName(Mobile[i], called, sizeof(called));
format(string, sizeof(string), "* %s'ov Mobilen zvoni.", called);
RingTone[Mobile[i]] = 10;
ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
if(CellTime[i] == 0 && CallCost[i] > 0)
{
format(string, sizeof(string), "~w~Cena na povik~n~~r~$%d",CallCost[i]);
GivePlayerMoney(i, -CallCost[i]);
SBizzInfo[2][sbTill] += CallCost[i];
ExtortionSBiz(2, CallCost[i]);
GameTextForPlayer(i, string, 5000, 1);
CallCost[i] = 0;
}
if(TransportTime[i] > 0)
{//Taxi driver and passenger only
if(TransportTime[i] >= 16)
{
TransportTime[i] = 1;
if(TransportDriver[i] < 999)
{
if(IsPlayerConnected(TransportDriver[i]))
{
TransportCost[i] += TransportValue[TransportDriver[i]];
TransportCost[TransportDriver[i]] = TransportCost[i];
}
}
}
TransportTime[i] += 1;
format(string, sizeof(string), "~r~%d ~w~: ~g~$%d",TransportTime[i],TransportCost[i]);
GameTextForPlayer(i, string, 15000, 6);
}
}
}
ERROR->return 1;
}

