Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OtherTimer()
- {
- new string[256];
- new Float:oldposx, Float:oldposy, Float:oldposz;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(SafeTime[i] > 0)
- {
- SafeTime[i]--;
- }
- if(SafeTime[i] == 1)
- {
- if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
- {
- new loginstring[128];
- new loginname[64];
- GetPlayerName(i,loginname,64);
- format(loginstring, 128, "{FFFFFF}Salut {F65205}%s {FFFFFF}si Bine Ai Venit\n{FFFFFF}Statistici: {E60000}Cont Inregistrat\n" , loginname);
- ShowPlayerDialog(i, 12346,DIALOG_STYLE_INPUT,"Logare eXtream.Ro",loginstring,"Logare","Iesire");
- }
- }
- 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 > 500)
- {
- format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
- }
- GameTextForPlayer(i, string, 2000, 5);
- }
- }
- 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 a parasit homemodshop cu %d lei >>",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's suna telefonul.", 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~Apelul a costat~n~~r~ %d lei",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 lei",TransportTime[i],TransportCost[i]);
- GameTextForPlayer(i, string, 15000, 6);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment