Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ptask NhipDapServer[1000](playerid)
- {
- if(IsDangNhap(playerid) && !IsPlayerNPC(playerid))
- {
- //Geek 2//
- if(GetPVarInt(playerid, "ArmsTimer") > 0)
- SetPVarInt(playerid, "ArmsTimer", GetPVarInt(playerid, "ArmsTimer")-1);
- if(GetPVarInt(playerid, "GiveWeaponTimer") > 0)
- SetPVarInt(playerid, "GiveWeaponTimer", GetPVarInt(playerid, "GiveWeaponTimer")-1);
- if(GetPVarInt(playerid, "CanSaTimer") > 0)
- SetPVarInt(playerid, "CanSaTimer", GetPVarInt(playerid, "CanSaTimer")-1);
- if(GetPVarInt(playerid, "MaTuyTimer") > 0)
- SetPVarInt(playerid, "MaTuyTimer", GetPVarInt(playerid, "MaTuyTimer")-1);
- if(GetPVarInt(playerid, "ThuocLacTimer") > 0) {
- SetPVarInt(playerid, "ThuocLacTimer", GetPVarInt(playerid, "ThuocLacTimer")-1);
- if(GetPVarInt(playerid, "ThuocLacTimer") == 0) SetPlayerDrunkLevel(playerid, 0);
- }
- if(GetPVarInt(playerid, "MocTuiTimer") > 0)
- SetPVarInt(playerid, "MocTuiTimer", GetPVarInt(playerid, "MocTuiTimer")-1);
- if(GetPVarInt(playerid, "TromXeTimer") > 0)
- {
- SetPVarInt(playerid, "TromXeTimer", GetPVarInt(playerid, "TromXeTimer")-1);
- GetAnimationName(GetPlayerAnimationIndex(playerid),AnimLib,32,AnimName,32);
- if(strcmp(AnimName, "COPBROWSE_LOOP", true) != 0 || IsPlayerMoving(playerid))
- {
- SetPVarInt(playerid, "TromXeTimer", -1);
- RemovePlayerAttachedObject(playerid, 9);
- SendMessage(playerid, COLOR_YELLOW, " Pha khoa xe that bai !");
- }
- else if(GetPVarInt(playerid, "TromXeTimer") == 0) {
- MoKhoaXe(GetPVarInt(playerid,"TromXeID"));
- ClearAnimations(playerid);
- RemovePlayerAttachedObject(playerid, 9);
- SendMessage(playerid, COLOR_YELLOW, " Pha khoa xe thanh cong!");
- }
- }
- if(GetPVarInt(playerid,"MayNgheLenVeh") >= 0)
- GetVehiclePos(GetPVarInt(playerid,"MayNgheLenVeh"),MayNgheLenPos[playerid][0],MayNgheLenPos[playerid][1],MayNgheLenPos[playerid][2]);
- if(GetPVarInt(playerid, "MayNgheLenTimer") > 0) {
- SetPVarInt(playerid, "MayNgheLenTimer", GetPVarInt(playerid, "MayNgheLenTimer")-1);
- if(GetPVarInt(playerid, "MayNgheLenTimer") == 0)
- {
- MayNgheLenPos[playerid][0] = 0x7F800000;
- MayNgheLenPos[playerid][1] = 0x7F800000;
- MayNgheLenPos[playerid][2] = 0x7F800000;
- SendMessage(playerid, COLOR_YELLOW, "May nghe len het pin va khong the su dung duoc nua");
- }
- }
- if(IsPlayerConnected(playerid)) {
- if(MayTheoDoiOn[playerid] == 1) {
- new vehid = GetPVarInt(playerid, "MayTheoDoiVeh");
- if(IsVehicleConnected(vehid)) {
- new Float:vehx, Float:vehy, Float:vehz;
- GetVehiclePos(vehid, vehx, vehy, vehz);
- SetPlayerCheckpoint(playerid,vehx, vehy,vehz, 5.0);
- }
- }
- }
- //Geek 2//
- if(IsPlayerInRangeOfPoint(playerid, 3, AFKPos[playerid][0], AFKPos[playerid][1], AFKPos[playerid][2])) {AFK[playerid]++;} else {AFK[playerid] = 0;}
- GetPlayerPos(playerid, AFKPos[playerid][0], AFKPos[playerid][1], AFKPos[playerid][2]);
- if(TimeCommand[playerid]>0) TimeCommand[playerid]--;
- if(GoiHoTro[playerid] == 1) GetPlayerPos(playerid, HoTroPos[playerid][0], HoTroPos[playerid][1], HoTroPos[playerid][2]);
- if(NhanHoTro[playerid] != -1)
- {
- new pid = NhanHoTro[playerid];
- SetPlayerCheckpoint(playerid, HoTroPos[pid][0], HoTroPos[pid][1], HoTroPos[pid][2], 4);
- }
- if(TimeWarn[playerid] >0) TimeWarn[playerid]--;
- if(TimeYCTG[playerid] >0) TimeYCTG[playerid]--;
- if(IsAtZoneNhac(playerid) && PhatAudio[playerid] == 0 && RURL[0] != EOS)
- {
- new i = GetZoneNhac(playerid);
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vid = GetPlayerVehicleID(playerid);
- if(RMoTat[vid] == 0)
- {
- PlayAudioStreamForPlayer(playerid, RURL, ZonePos[ZoneNhac[i]][0], ZonePos[ZoneNhac[i]][1], ZonePos[ZoneNhac[i]][2], ZoneRange[ZoneNhac[i]], 1);
- PhatAudio[playerid] = 1;
- }
- }
- else
- {
- PlayAudioStreamForPlayer(playerid, RURL, ZonePos[ZoneNhac[i]][0], ZonePos[ZoneNhac[i]][1], ZonePos[ZoneNhac[i]][2], ZoneRange[ZoneNhac[i]], 1);
- PhatAudio[playerid] = 1;
- }
- }
- else if(!IsAtZoneNhac(playerid) && PhatAudio[playerid] == 1 && RURL[0] != EOS)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vid = GetPlayerVehicleID(playerid);
- if(RMoTat[vid] == 0)
- {
- StopAudioStreamForPlayer(playerid);
- PhatAudio[playerid] = 0;
- }
- }
- else
- {
- StopAudioStreamForPlayer(playerid);
- PhatAudio[playerid] = 0;
- }
- }
- if(tgtaiche[playerid] >0) tgtaiche[playerid]--;
- if(KhachTaxi[playerid] != -1 && GoiTaxi[KhachTaxi[playerid]] == 1)
- {
- new Float:Pos[3];
- GetPlayerPos(KhachTaxi[playerid], Pos[0], Pos[1], Pos[2]);
- SetPlayerCheckpoint(playerid, Pos[0], Pos[1], Pos[2], 4);
- if(IsPlayerNearPlayer(playerid, KhachTaxi[playerid], 5))
- {
- GoiTaxi[KhachTaxi[playerid]] = 0;
- DisablePlayerCheckpoint(playerid);
- }
- }
- if(NguoiGoiCapCuu[playerid] != -1 && GoiCapCuu[NguoiGoiCapCuu[playerid]] != 0)
- {
- new Float:Pos[3];
- GetPlayerPos(NguoiGoiCapCuu[playerid], Pos[0], Pos[1], Pos[2]);
- SetPlayerCheckpoint(playerid, Pos[0], Pos[1], Pos[2], 4);
- if(IsPlayerNearPlayer(playerid, NguoiGoiCapCuu[playerid], 5))
- {
- GoiCapCuu[NguoiGoiCapCuu[playerid]] = 0;
- NguoiGoiCapCuu[playerid] = -1;
- DisablePlayerCheckpoint(playerid);
- }
- }
- if(TimeGoiTaxi[playerid] > 0)
- {
- if(--TimeGoiTaxi[playerid] <= 0) GoiTaxi[playerid] = 0;
- }
- if(TimeGoiSuaXe[playerid] > 0)
- {
- if(--TimeGoiSuaXe[playerid] <=0) GoiSuaXe[playerid] = 0;
- }
- if(BiThuong[playerid] == 1 && CamMau[playerid] == 0)
- {
- new Float:mau;
- GetPlayerHealth(playerid, mau);
- SetPlayerHealth(playerid, mau-1);
- if(!IsPlayerInRangeOfPoint(playerid, 3, BTPos[playerid][0], BTPos[playerid][1], BTPos[playerid][2])) NamVien(playerid);
- GetAnimationName(GetPlayerAnimationIndex(playerid),AnimLib,32,AnimName,32);
- if(strcmp(AnimName, "KILL_Knife_Ped_Die", true) != 0) ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
- }
- if(NewbieTime[playerid] > 0) NewbieTime[playerid]--;
- /*
- if(PInfo[playerid][TheLuc] > 0) PInfo[playerid][TheLuc] -= 0.06;
- else if(PInfo[playerid][TheLuc] <= 0 && BiThuong[playerid] == 0)
- {
- new Float:mau;
- GetPlayerHealth(playerid, mau);
- if(mau>0) SetPlayerHealth(playerid, mau-0.3);
- }
- */
- if(DangApGiai[playerid] == 1)
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- if(!IsPlayerInRangeOfPoint(NguoiApGiai[playerid], 4, Pos[0], Pos[1], Pos[2])) SetPlayerPos(NguoiApGiai[playerid], Pos[0]+0.5, Pos[1]+0.5, Pos[2]);
- }
- if(TimeTrungDan[playerid] >0) TimeTrungDan[playerid]--;
- if(TrungDanCS[playerid] >=3)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new Float:Pos[3], Float:speed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+0.1);
- if(speed <= 10) ApplyAnimation(playerid, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 0, 1500, 1);
- else ApplyAnimation(playerid, "PED", "BIKE_fallR", 4.1, 0, 1, 1, 0, 1500, 1);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)))
- {
- if(speed <= 10) ApplyAnimation(i, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 0, 1500, 1);
- else ApplyAnimation(i, "PED", "BIKE_fallR", 4.1, 0, 1, 1, 0, 1500, 1);
- }
- }
- TrungDanCS[playerid] = 0;
- }
- else
- {
- TogglePlayerControllable(playerid, 0);
- ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 1, 1, 1, 0, 1);
- SetTimerEx("QueGio", 12000, 0, "i", playerid);
- TrungDanCS[playerid] = 0;
- BiQueGio[playerid] = 1;
- }
- }
- if((PInfo[playerid][Tu] == 1 || PInfo[playerid][Tu] == 2) && PInfo[playerid][TGTu] > 0 && --PInfo[playerid][TGTu] <= 0)
- {
- SetPlayerPos(playerid, 1543.1277,-1675.6676,13.5558);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerFacingAngle(playerid, 90.0);
- SetCameraBehindPlayer(playerid);
- PInfo[playerid][Tu] = 0;
- PInfo[playerid][TGTu] = 0;
- GameTextForPlayer(playerid, "Het thoi gian ngoi tu", 5000, 4);
- }
- if(TGSoCuu[playerid]>0) TGSoCuu[playerid]--;
- if(TGCheTaoCN[playerid] >0)
- {
- if(--TGCheTaoCN[playerid] <= 0)
- {
- SetCheckpoint(playerid, 1368.0283,35.2858,1007.8994, 1.5);
- TGCheTaoCN[playerid] = -2;
- GameTextForPlayer(playerid, "~y~Da che tao xong", 1000, 6);
- }
- new str[50];
- format(str,sizeof(str), "~r~Thoi gian cho con lai:~n~~y~%d giay", TGCheTaoCN[playerid]);
- GameTextForPlayer(playerid, str, 1000, 6);
- }
- if(TimeThi[playerid] > 0)
- {
- if(--TimeThi[playerid] == 0) ClearThiBangLai(playerid, GetPlayerVehicleID(playerid));
- new str[128];
- format(str, sizeof(str), "~b~Thoi gian con lai:~n~~y~%d", TimeThi[playerid]);
- GameTextForPlayer(playerid, str, 1000, 6);
- }
- if(MTTaxiClock[playerid] == 1)
- {
- TaxiTime[playerid]++;
- UpdateTaxiClockTime(playerid);
- }
- //////////////////////ANTIHACK/////////////////////////
- if(GetPlayerMoney(playerid) != PInfo[playerid][Tien])
- {
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, PInfo[playerid][Tien]);
- }
- if(AntiCheckpoint[playerid] == 1) AntiCPTime[playerid]++;
- CheckHackWeapon(playerid);
- if(TimeAnim[playerid] >0 && --TimeAnim[playerid] <= 0)
- {
- CountAnim[playerid] = 0;
- TheAnim[playerid] = 1;
- TimeAnim[playerid] = 0;
- new cmd_str[36];
- cmd_str = "cmd_";
- new TenAnim[128];
- GetPVarString(playerid, "TenAnim", TenAnim, sizeof(TenAnim));
- strcat(cmd_str, TenAnim);
- CallLocalFunction(cmd_str,"ds",playerid,"\1");
- TheAnim[playerid] = -1;
- HidePlayerProgressBar(playerid, thanhhoatdong);
- ClearAnimations(playerid);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement