Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; <COMPILER: v1.1.22.02>
- global ERROR_OK := 0
- global ERROR_PROCESS_NOT_FOUND := 1
- global ERROR_OPEN_PROCESS := 2
- global ERROR_INVALID_HANDLE := 3
- global ERROR_MODULE_NOT_FOUND := 4
- global ERROR_ENUM_PROCESS_MODULES := 5
- global ERROR_ZONE_NOT_FOUND := 6
- global ERROR_CITY_NOT_FOUND := 7
- global ERROR_READ_MEMORY := 8
- global ERROR_WRITE_MEMORY := 9
- global ERROR_ALLOC_MEMORY := 10
- global ERROR_FREE_MEMORY := 11
- global ERROR_WAIT_FOR_OBJECT := 12
- global ERROR_CREATE_THREAD := 13
- global ADDR_ZONECODE := 0xA49AD4
- global ADDR_POSITION_X := 0xB6F2E4
- global ADDR_POSITION_Y := 0xB6F2E8
- global ADDR_POSITION_Z := 0xB6F2EC
- global ADDR_CPED_PTR := 0xB6F5F0
- global ADDR_CPED_HPOFF := 0x540
- global ADDR_CPED_ARMOROFF := 0x548
- global ADDR_VEHICLE_PTR := 0xBA18FC
- global ADDR_VEHICLE_HPOFF := 0x4C0
- global ADDR_CPED_MONEY := 0xB7CE50
- global ADDR_CPED_INTID := 0xA4ACE8
- global ADDR_VEHICLE_DOORSTATE := 0x4F8
- global ADDR_VEHICLE_ENGINESTATE := 0x428
- global ADDR_VEHICLE_LIGHTSTATE := 0x428
- global ADDR_VEHICLE_MODEL := 0x22
- global ADDR_VEHICLE_TYPE := 0x590
- global ADDR_VEHICLE_DRIVER := 0x460
- global oAirplaneModels := [417, 425, 447, 460, 469, 476, 487, 488, 497, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593]
- global oBikeModels := [481,509,510]
- global ovehicleNames := ["Landstalker","Bravura","Buffalo","Linerunner","Perrenial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Whoopee","BFInjection","Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo","RCBandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley'sRCVan","Skimmer","PCJ-600","Faggio","Freeway","RCBaron","RCRaider","Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina","Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","NewsChopper","Rancher","FBIRancher","Virgo","Greenwood","Jetmax","Hotring","Sandking","BlistaCompact","PoliceMaverick","Boxvillde","Benson","Mesa","RCGoblin","HotringRacerA","HotringRacerB","BloodringBanger","Rancher","SuperGT","Elegant","Journey","Bike","MountainBike","Beagle","Cropduster","Stunt","Tanker","Roadtrain","Nebula","Majestic","Buccaneer","Shamal","hydra","FCR-900","NRG-500","HPV1000","CementTruck","TowTruck","Fortune","Cadrona","FBITruck","Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover","Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster","Monster","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RCTiger","Flash","Tahoma","Savanna","Bandito","FreightFlat","StreakCarriage","Kart","Mower","Dune","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","NewsVan","Tug","Trailer","Emperor","Wayfarer","Euros","Hotdog","Club","FreightBox","Trailer","Andromada","Dodo","RCCam","Launch","PoliceCar","PoliceCar","PoliceCar","PoliceRanger","Picador","S.W.A.T","Alpha","Phoenix","GlendaleShit","SadlerShit","Luggage","Luggage","Stairs","Boxville","Tiller","UtilityTrailer"]
- global ADDR_SAMP_INCHAT_PTR := 0x21A10C
- global ADDR_SAMP_INCHAT_PTR_OFF := 0x55
- global ADDR_SAMP_USERNAME := 0x219A6F
- global ADDR_SAMP_CHATMSG_PTR := 0x21A0E4
- global ADDR_SAMP_SHOWDLG_PTR := 0x21A0B8
- global FUNC_SAMP_SENDCMD := 0x65C60
- global FUNC_SAMP_SENDSAY := 0x57F0
- global FUNC_SAMP_ADDTOCHATWND := 0x64520
- global FUNC_SAMP_SHOWGAMETEXT := 0x9C2C0
- global FUNC_SAMP_PLAYAUDIOSTR := 0x62DA0
- global FUNC_SAMP_STOPAUDIOSTR := 0x629A0
- global FUNC_SAMP_SHOWDIALOG := 0x6B9C0
- global FUNC_UPDATESCOREBOARD := 0x8A10
- global SAMP_INFO_OFFSET := 0x21A0F8
- global SAMP_PPOOLS_OFFSET := 0x3CD
- global SAMP_PPOOL_PLAYER_OFFSET := 0x18
- global SAMP_SLOCALPLAYERID_OFFSET := 0x4
- global SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET := 0x1A
- global SAMP_SZLOCALPLAYERNAME_OFFSET := 0xA
- global SAMP_PSZLOCALPLAYERNAME_OFFSET := 0xA
- global SAMP_PREMOTEPLAYER_OFFSET := 0x2E
- global SAMP_ISTRLENNAME___OFFSET := 0x1C
- global SAMP_SZPLAYERNAME_OFFSET := 0xC
- global SAMP_PSZPLAYERNAME_OFFSET := 0xC
- global SAMP_ILOCALPLAYERPING_OFFSET := 0x26
- global SAMP_ILOCALPLAYERSCORE_OFFSET := 0x2A
- global SAMP_IPING_OFFSET := 0x28
- global SAMP_ISCORE_OFFSET := 0x24
- global SAMP_ISNPC_OFFSET := 0x4
- global SAMP_PLAYER_MAX := 1004
- global SIZE_SAMP_CHATMSG := 0xFC
- global hGTA := 0x0
- global dwGTAPID := 0x0
- global dwSAMP := 0x0
- global pMemory := 0x0
- global pParam1 := 0x0
- global pParam2 := 0x0
- global pParam3 := 0x0
- global pInjectFunc := 0x0
- global nZone := 1
- global nCity := 1
- global bInitZaC := 0
- global iRefreshScoreboard := 0
- global oScoreboardData := ""
- global iRefreshHandles := 0
- global iUpdateTick := 2500
- isInChat() {
- if(!checkHandles())
- return -1
- dwPtr := dwSAMP + ADDR_SAMP_INCHAT_PTR
- dwAddress := readDWORD(hGTA, dwPtr) + ADDR_SAMP_INCHAT_PTR_OFF
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- dwInChat := readDWORD(hGTA, dwAddress)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- if(dwInChat > 0) {
- return true
- } else {
- return false
- }
- }
- getUsername() {
- if(!checkHandles())
- return ""
- dwAddress := dwSAMP + ADDR_SAMP_USERNAME
- sUsername := readString(hGTA, dwAddress, 25)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- ErrorLevel := ERROR_OK
- return sUsername
- }
- getId() {
- s:=getUsername()
- return getPlayerIdByName(s)
- }
- sendChatMessage(wText) {
- wText := "" wText
- if(!checkHandles())
- return false
- dwFunc:=0
- if(SubStr(wText, 1, 1) == "/") {
- dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
- } else {
- dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
- }
- callWithParams(hGTA, dwFunc, [["s", wText]], false)
- ErrorLevel := ERROR_OK
- return true
- }
- addMessageToChatWindow(wText) {
- wText := "" wText
- if(!checkHandles())
- return false
- dwFunc := dwSAMP + FUNC_SAMP_ADDTOCHATWND
- dwChatInfo := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return false
- }
- callWithParams(hGTA, dwFunc, [["p", dwChatInfo], ["s", wText]], true)
- ErrorLevel := ERROR_OK
- return true
- }
- showGameText(wText, dwTime, dwSize) {
- wText := "" wText
- dwTime += 0
- dwTime := Floor(dwTime)
- dwSize += 0
- dwSize := Floor(dwSize)
- if(!checkHandles())
- return false
- dwFunc := dwSAMP + FUNC_SAMP_SHOWGAMETEXT
- callWithParams(hGTA, dwFunc, [["s", wText], ["i", dwTime], ["i", dwSize]], false)
- ErrorLevel := ERROR_OK
- return true
- }
- showDialog(dwStyle, wCaption, wInfo, wButton1 ) {
- dwStyle += 0
- dwStyle := Floor(dwStyle)
- wCaption := "" wCaption
- wInfo := "" wInfo
- wButton1 := "" wButton1
- if(!checkHandles())
- return false
- dwFunc := dwSAMP + FUNC_SAMP_SHOWDIALOG
- dwAddress := readDWORD(hGTA, dwSAMP + ADDR_SAMP_SHOWDLG_PTR)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return false
- }
- writeString(hGTA, pParam1, wCaption)
- if(ErrorLevel)
- return false
- writeString(hGTA, pParam2, wInfo)
- if(ErrorLevel)
- return false
- writeString(hGTA, pParam3, wButton1)
- if(ErrorLevel)
- return false
- dwLen := 5 + 7*5 + 5 + 1
- VarSetCapacity(injectData, dwLen, 0)
- NumPut(0xB9, injectData, 0, "UChar")
- NumPut(dwAddress, injectData, 1, "UInt")
- NumPut(0x68, injectData, 5, "UChar")
- NumPut(0, injectData, 6, "UInt")
- NumPut(0x68, injectData, 10, "UChar")
- NumPut(pParam1+StrLen(wCaption), injectData, 11, "UInt")
- NumPut(0x68, injectData, 15, "UChar")
- NumPut(pParam3, injectData, 16, "UInt")
- NumPut(0x68, injectData, 20, "UChar")
- NumPut(pParam2, injectData, 21, "UInt")
- NumPut(0x68, injectData, 25, "UChar")
- NumPut(pParam1, injectData, 26, "UInt")
- NumPut(0x68, injectData, 30, "UChar")
- NumPut(dwStyle, injectData, 31, "UInt")
- NumPut(0x68, injectData, 35, "UChar")
- NumPut(1, injectData, 36, "UInt")
- NumPut(0xE8, injectData, 40, "UChar")
- offset := dwFunc - (pInjectFunc + 45)
- NumPut(offset, injectData, 41, "Int")
- NumPut(0xC3, injectData, 45, "UChar")
- writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- return true
- }
- playAudioStream(wUrl) {
- wUrl := "" wUrl
- if(!checkHandles())
- return false
- dwFunc := dwSAMP + FUNC_SAMP_PLAYAUDIOSTR
- patchRadio()
- callWithParams(hGTA, dwFunc, [["s", wUrl], ["i", 0], ["i", 0], ["i", 0], ["i", 0], ["i", 0]], false)
- unPatchRadio()
- ErrorLevel := ERROR_OK
- return true
- }
- stopAudioStream() {
- if(!checkHandles())
- return false
- dwFunc := dwSAMP + FUNC_SAMP_STOPAUDIOSTR
- patchRadio()
- callWithParams(hGTA, dwFunc, [["i", 1]], false)
- unPatchRadio()
- ErrorLevel := ERROR_OK
- return true
- }
- blockChatInput() {
- if(!checkHandles())
- return false
- VarSetCapacity(nop, 2, 0)
- dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
- NumPut(0x04C2,nop,0,"Short")
- writeRaw(hGTA, dwFunc, &nop, 2)
- dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
- writeRaw(hGTA, dwFunc, &nop, 2)
- return true
- }
- unBlockChatInput() {
- if(!checkHandles())
- return false
- VarSetCapacity(nop, 2, 0)
- dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
- NumPut(0xA164,nop,0,"Short")
- writeRaw(hGTA, dwFunc, &nop, 2)
- dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
- writeRaw(hGTA, dwFunc, &nop, 2)
- return true
- }
- patchRadio() {
- if(!checkHandles())
- return false
- VarSetCapacity(nop, 4, 0)
- NumPut(0x90909090,nop,0,"UInt")
- dwFunc := dwSAMP + FUNC_SAMP_PLAYAUDIOSTR
- writeRaw(hGTA, dwFunc, &nop, 4)
- writeRaw(hGTA, dwFunc+4, &nop, 1)
- dwFunc := dwSAMP + FUNC_SAMP_STOPAUDIOSTR
- writeRaw(hGTA, dwFunc, &nop, 4)
- writeRaw(hGTA, dwFunc+4, &nop, 1)
- return true
- }
- unPatchRadio() {
- if(!checkHandles())
- return false
- VarSetCapacity(old, 4, 0)
- dwFunc := dwSAMP + FUNC_SAMP_PLAYAUDIOSTR
- NumPut(0x74003980,old,0,"UInt")
- writeRaw(hGTA, dwFunc, &old, 4)
- NumPut(0x39,old,0,"UChar")
- writeRaw(hGTA, dwFunc+4, &old, 1)
- dwFunc := dwSAMP + FUNC_SAMP_STOPAUDIOSTR
- NumPut(0x74003980,old,0,"UInt")
- writeRaw(hGTA, dwFunc, &old, 4)
- NumPut(0x09,old,0,"UChar")
- writeRaw(hGTA, dwFunc+4, &old, 1)
- return true
- }
- getPlayerNameById(dwId) {
- dwId += 0
- dwId := Floor(dwId)
- if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
- return ""
- if(iRefreshScoreboard+iUpdateTick > A_TickCount)
- {
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].NAME
- return ""
- }
- if(!updateOScoreboardData())
- return ""
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].NAME
- return ""
- }
- getPlayerIdByName(wName) {
- wName := "" wName
- if(StrLen(wName) < 1 || StrLen(wName) > 20)
- return -1
- if(iRefreshScoreboard+iUpdateTick > A_TickCount)
- {
- For i, o in oScoreboardData
- {
- if(InStr(o.NAME,wName)==1)
- return i
- }
- return -1
- }
- if(!updateOScoreboardData())
- return -1
- For i, o in oScoreboardData
- {
- if(InStr(o.NAME,wName)==1)
- return i
- }
- return -1
- }
- getPlayerScoreById(dwId) {
- dwId += 0
- dwId := Floor(dwId)
- if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
- return ""
- if(iRefreshScoreboard+iUpdateTick > A_TickCount)
- {
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].SCORE
- return ""
- }
- if(!updateOScoreboardData())
- return ""
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].SCORE
- return ""
- }
- getPlayerPingById(dwId) {
- dwId += 0
- dwId := Floor(dwId)
- if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
- return -1
- if(iRefreshScoreboard+iUpdateTick > A_TickCount)
- {
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].PING
- return -1
- }
- if(!updateOScoreboardData())
- return -1
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].PING
- return -1
- }
- isNPCById(dwId) {
- dwId += 0
- dwId := Floor(dwId)
- if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
- return -1
- if(iRefreshScoreboard+iUpdateTick > A_TickCount)
- {
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].ISNPC
- return -1
- }
- if(!updateOScoreboardData())
- return -1
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].ISNPC
- return -1
- }
- updateScoreboardDataEx() {
- if(!checkHandles())
- return false
- dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return false
- }
- dwFunc := dwSAMP + FUNC_UPDATESCOREBOARD
- VarSetCapacity(injectData, 11, 0)
- NumPut(0xB9, injectData, 0, "UChar")
- NumPut(dwAddress, injectData, 1, "UInt")
- NumPut(0xE8, injectData, 5, "UChar")
- offset := dwFunc - (pInjectFunc + 10)
- NumPut(offset, injectData, 6, "Int")
- NumPut(0xC3, injectData, 10, "UChar")
- writeRaw(hGTA, pInjectFunc, &injectData, 11)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- return true
- }
- updateOScoreboardData() {
- if(!checkHandles())
- return 0
- oScoreboardData := []
- if(!updateScoreboardDataEx())
- return 0
- iRefreshScoreboard := A_TickCount
- dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwPlayers := readDWORD(hGTA, dwAddress + SAMP_PPOOL_PLAYER_OFFSET)
- if(ErrorLevel || dwPlayers==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- wID := readMem(hGTA, dwPlayers + SAMP_SLOCALPLAYERID_OFFSET, 2, "Short")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwPing := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERPING_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwScore := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERSCORE_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwTemp := readMem(hGTA, dwPlayers + SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := ""
- if(dwTemp <= 0xf) {
- sUsername := readString(hGTA, dwPlayers + SAMP_SZLOCALPLAYERNAME_OFFSET, 16)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- else {
- dwAddress := readDWORD(hGTA, dwPlayers + SAMP_PSZLOCALPLAYERNAME_OFFSET)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := readString(hGTA, dwAddress, 25)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- oScoreboardData[wID] := Object("NAME", sUsername, "ID", wID, "PING", dwPing, "SCORE", dwScore, "ISNPC", 0)
- Loop, % SAMP_PLAYER_MAX
- {
- i := A_Index-1
- dwRemoteplayer := readDWORD(hGTA, dwPlayers+SAMP_PREMOTEPLAYER_OFFSET+i*4)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- if(dwRemoteplayer==0)
- continue
- dwPing := readMem(hGTA, dwRemoteplayer + SAMP_IPING_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwScore := readMem(hGTA, dwRemoteplayer + SAMP_ISCORE_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwIsNPC := readMem(hGTA, dwRemoteplayer + SAMP_ISNPC_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwTemp := readMem(hGTA, dwRemoteplayer + SAMP_ISTRLENNAME___OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := ""
- if(dwTemp <= 0xf)
- {
- sUsername := readString(hGTA, dwRemoteplayer+SAMP_SZPLAYERNAME_OFFSET, 16)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- else {
- dwAddress := readDWORD(hGTA, dwRemoteplayer + SAMP_PSZPLAYERNAME_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := readString(hGTA, dwAddress, 25)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- o := Object("NAME", sUsername, "ID", i, "PING", dwPing, "SCORE", dwScore, "ISNPC", dwIsNPC)
- oScoreboardData[i] := o
- }
- ErrorLevel := ERROR_OK
- return 1
- }
- getPlayerHealth() {
- if(!checkHandles())
- return -1
- dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- dwAddr := dwCPedPtr + ADDR_CPED_HPOFF
- fHealth := readFloat(hGTA, dwAddr)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return Round(fHealth)
- }
- getPlayerArmor() {
- if(!checkHandles())
- return -1
- dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- dwAddr := dwCPedPtr + ADDR_CPED_ARMOROFF
- fHealth := readFloat(hGTA, dwAddr)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return Round(fHealth)
- }
- getPlayerInteriorId() {
- if(!checkHandles())
- return -1
- iid := readMem(hGTA, ADDR_CPED_INTID, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return iid
- }
- getPlayerMoney() {
- if(!checkHandles())
- return ""
- money := readMem(hGTA, ADDR_CPED_MONEY, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- ErrorLevel := ERROR_OK
- return money
- }
- isPlayerInAnyVehicle()
- {
- if(!checkHandles())
- return -1
- dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- return (dwVehPtr > 0)
- }
- isPlayerDriver() {
- if(!checkHandles())
- return -1
- dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- if(!dwAddr)
- return -1
- dwCPedPtr := readDWORD(hGTA, ADDR_CPED_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- dwVal := readDWORD(hGTA, dwAddr + ADDR_VEHICLE_DRIVER)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return (dwVal==dwCPedPtr)
- }
- getVehicleHealth() {
- if(!checkHandles())
- return -1
- dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- dwAddr := dwVehPtr + ADDR_VEHICLE_HPOFF
- fHealth := readFloat(hGTA, dwAddr)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return Round(fHealth)
- }
- getVehicleType() {
- if(!checkHandles())
- return 0
- dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- if(!dwAddr)
- return 0
- cVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_TYPE, 1, "Char")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- if(!cVal)
- {
- mid := getVehicleModelId()
- Loop % oAirplaneModels.MaxIndex()
- {
- if(oAirplaneModels[A_Index]==mid)
- return 5
- }
- return 1
- }
- else if(cVal==5)
- return 2
- else if(cVal==6)
- return 3
- else if(cVal==9)
- {
- mid := getVehicleModelId()
- Loop % oBikeModels.MaxIndex()
- {
- if(oBikeModels[A_Index]==mid)
- return 6
- }
- return 4
- }
- return 0
- }
- getVehicleModelId() {
- if(!checkHandles())
- return 0
- dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- if(!dwAddr)
- return 0
- sVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_MODEL, 2, "Short")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return sVal
- }
- getVehicleModelName() {
- id:=getVehicleModelId()
- if(id>400 && id <611)
- {
- return ovehicleNames[id-399]
- }
- return ""
- }
- getVehicleLightState() {
- if(!checkHandles())
- return -1
- dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- if(!dwAddr)
- return -1
- dwVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_LIGHTSTATE, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return (dwVal>0)
- }
- getVehicleEngineState() {
- if(!checkHandles())
- return -1
- dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- if(!dwAddr)
- return -1
- cVal := readMem(hGTA, dwAddr + ADDR_VEHICLE_ENGINESTATE, 1, "Char")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return (cVal==24 || cVal==56 || cVal==88 || cVal==120)
- }
- getVehicleLockState() {
- if(!checkHandles())
- return -1
- dwAddr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- if(!dwAddr)
- return -1
- dwVal := readDWORD(hGTA, dwAddr + ADDR_VEHICLE_DOORSTATE)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return (dwVal==2)
- }
- getCoordinates() {
- if(!checkHandles())
- return ""
- fX := readFloat(hGTA, ADDR_POSITION_X)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- fY := readFloat(hGTA, ADDR_POSITION_Y)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- fZ := readFloat(hGTA, ADDR_POSITION_Z)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- ErrorLevel := ERROR_OK
- return [fX, fY, fZ]
- }
- calculateZone(posX, posY, posZ) {
- posX += 0
- posY += 0
- posZ += 0
- if ( !bInitZaC )
- {
- initZonesAndCities()
- bInitZaC := 1
- }
- Loop % nZone-1
- {
- if (posX >= zone%A_Index%_x1) && (posY >= zone%A_Index%_y1) && (posZ >= zone%A_Index%_z1) && (posX <= zone%A_Index%_x2) && (posY <= zone%A_Index%_y2) && (posZ <= zone%A_Index%_z2)
- {
- ErrorLevel := ERROR_OK
- return zone%A_Index%_name
- }
- }
- ErrorLevel := ERROR_ZONE_NOT_FOUND
- return ""
- }
- calculateCity(posX, posY, posZ) {
- posX += 0
- posY += 0
- posZ += 0
- if ( !bInitZaC )
- {
- initZonesAndCities()
- bInitZaC := 1
- }
- smallestCity := ""
- currentCitySize := 0
- smallestCitySize := 0
- Loop % nCity-1
- {
- if (posX >= city%A_Index%_x1) && (posY >= city%A_Index%_y1) && (posZ >= city%A_Index%_z1) && (posX <= city%A_Index%_x2) && (posY <= city%A_Index%_y2) && (posZ <= city%A_Index%_z2)
- {
- currentCitySize := ((city%A_Index%_x2 - city%A_Index%_x1) * (city%A_Index%_y2 - city%A_Index%_y1) * (city%A_Index%_z2 - city%A_Index%_z1))
- if (!smallestCity) || (currentCitySize < smallestCitySize)
- {
- smallestCity := city%A_Index%_name
- smallestCitySize := currentCitySize
- }
- }
- }
- if(!smallestCity) {
- ErrorLevel := ERROR_CITY_NOT_FOUND
- } else {
- ErrorLevel := ERROR_OK
- }
- return smallestCity
- }
- initZonesAndCities() {
- if(bInitZaC)
- return
- AddCity("Las Venturas", 685.0, 476.093, -500.0, 3000.0, 3000.0, 500.0)
- AddCity("San Fierro", -3000.0, -742.306, -500.0, -1270.53, 1530.24, 500.0)
- AddCity("San Fierro", -1270.53, -402.481, -500.0, -1038.45, 832.495, 500.0)
- AddCity("San Fierro", -1038.45, -145.539, -500.0, -897.546, 376.632, 500.0)
- AddCity("Los Santos", 480.0, -3000.0, -500.0, 3000.0, -850.0, 500.0)
- AddCity("Los Santos", 80.0, -2101.61, -500.0, 1075.0, -1239.61, 500.0)
- AddCity("Tierra Robada", -1213.91, 596.349, -242.99, -480.539, 1659.68, 900.0)
- AddCity("Red County", -1213.91, -768.027, -242.99, 2997.06, 596.349, 900.0)
- AddCity("Flint County", -1213.91, -2892.97, -242.99, 44.6147, -768.027, 900.0)
- AddCity("Whetstone", -2997.47, -2892.97, -242.99, -1213.91, -1115.58, 900.0)
- AddZone("Avispa Country Club", -2667.810, -302.135, -28.831, -2646.400, -262.320, 71.169)
- AddZone("Easter Bay Airport", -1315.420, -405.388, 15.406, -1264.400, -209.543, 25.406)
- AddZone("Avispa Country Club", -2550.040, -355.493, 0.000, -2470.040, -318.493, 39.700)
- AddZone("Easter Bay Airport", -1490.330, -209.543, 15.406, -1264.400, -148.388, 25.406)
- AddZone("Garcia", -2395.140, -222.589, -5.3, -2354.090, -204.792, 200.000)
- AddZone("Shady Cabin", -1632.830, -2263.440, -3.0, -1601.330, -2231.790, 200.000)
- AddZone("East Los Santos", 2381.680, -1494.030, -89.084, 2421.030, -1454.350, 110.916)
- AddZone("LVA Freight Depot", 1236.630, 1163.410, -89.084, 1277.050, 1203.280, 110.916)
- AddZone("Blackfield Intersection", 1277.050, 1044.690, -89.084, 1315.350, 1087.630, 110.916)
- AddZone("Avispa Country Club", -2470.040, -355.493, 0.000, -2270.040, -318.493, 46.100)
- AddZone("Temple", 1252.330, -926.999, -89.084, 1357.000, -910.170, 110.916)
- AddZone("Unity Station", 1692.620, -1971.800, -20.492, 1812.620, -1932.800, 79.508)
- AddZone("LVA Freight Depot", 1315.350, 1044.690, -89.084, 1375.600, 1087.630, 110.916)
- AddZone("Los Flores", 2581.730, -1454.350, -89.084, 2632.830, -1393.420, 110.916)
- AddZone("Starfish Casino", 2437.390, 1858.100, -39.084, 2495.090, 1970.850, 60.916)
- AddZone("Easter Bay Chemicals", -1132.820, -787.391, 0.000, -956.476, -768.027, 200.000)
- AddZone("Downtown Los Santos", 1370.850, -1170.870, -89.084, 1463.900, -1130.850, 110.916)
- AddZone("Esplanade East", -1620.300, 1176.520, -4.5, -1580.010, 1274.260, 200.000)
- AddZone("Market Station", 787.461, -1410.930, -34.126, 866.009, -1310.210, 65.874)
- AddZone("Linden Station", 2811.250, 1229.590, -39.594, 2861.250, 1407.590, 60.406)
- AddZone("Montgomery Intersection", 1582.440, 347.457, 0.000, 1664.620, 401.750, 200.000)
- AddZone("Frederick Bridge", 2759.250, 296.501, 0.000, 2774.250, 594.757, 200.000)
- AddZone("Yellow Bell Station", 1377.480, 2600.430, -21.926, 1492.450, 2687.360, 78.074)
- AddZone("Downtown Los Santos", 1507.510, -1385.210, 110.916, 1582.550, -1325.310, 335.916)
- AddZone("Jefferson", 2185.330, -1210.740, -89.084, 2281.450, -1154.590, 110.916)
- AddZone("Mulholland", 1318.130, -910.170, -89.084, 1357.000, -768.027, 110.916)
- AddZone("Avispa Country Club", -2361.510, -417.199, 0.000, -2270.040, -355.493, 200.000)
- AddZone("Jefferson", 1996.910, -1449.670, -89.084, 2056.860, -1350.720, 110.916)
- AddZone("Julius Thruway West", 1236.630, 2142.860, -89.084, 1297.470, 2243.230, 110.916)
- AddZone("Jefferson", 2124.660, -1494.030, -89.084, 2266.210, -1449.670, 110.916)
- AddZone("Julius Thruway North", 1848.400, 2478.490, -89.084, 1938.800, 2553.490, 110.916)
- AddZone("Rodeo", 422.680, -1570.200, -89.084, 466.223, -1406.050, 110.916)
- AddZone("Cranberry Station", -2007.830, 56.306, 0.000, -1922.000, 224.782, 100.000)
- AddZone("Downtown Los Santos", 1391.050, -1026.330, -89.084, 1463.900, -926.999, 110.916)
- AddZone("Redsands West", 1704.590, 2243.230, -89.084, 1777.390, 2342.830, 110.916)
- AddZone("Little Mexico", 1758.900, -1722.260, -89.084, 1812.620, -1577.590, 110.916)
- AddZone("Blackfield Intersection", 1375.600, 823.228, -89.084, 1457.390, 919.447, 110.916)
- AddZone("Los Santos International", 1974.630, -2394.330, -39.084, 2089.000, -2256.590, 60.916)
- AddZone("Beacon Hill", -399.633, -1075.520, -1.489, -319.033, -977.516, 198.511)
- AddZone("Rodeo", 334.503, -1501.950, -89.084, 422.680, -1406.050, 110.916)
- AddZone("Richman", 225.165, -1369.620, -89.084, 334.503, -1292.070, 110.916)
- AddZone("Downtown Los Santos", 1724.760, -1250.900, -89.084, 1812.620, -1150.870, 110.916)
- AddZone("The Strip", 2027.400, 1703.230, -89.084, 2137.400, 1783.230, 110.916)
- AddZone("Downtown Los Santos", 1378.330, -1130.850, -89.084, 1463.900, -1026.330, 110.916)
- AddZone("Blackfield Intersection", 1197.390, 1044.690, -89.084, 1277.050, 1163.390, 110.916)
- AddZone("Conference Center", 1073.220, -1842.270, -89.084, 1323.900, -1804.210, 110.916)
- AddZone("Montgomery", 1451.400, 347.457, -6.1, 1582.440, 420.802, 200.000)
- AddZone("Foster Valley", -2270.040, -430.276, -1.2, -2178.690, -324.114, 200.000)
- AddZone("Blackfield Chapel", 1325.600, 596.349, -89.084, 1375.600, 795.010, 110.916)
- AddZone("Los Santos International", 2051.630, -2597.260, -39.084, 2152.450, -2394.330, 60.916)
- AddZone("Mulholland", 1096.470, -910.170, -89.084, 1169.130, -768.027, 110.916)
- AddZone("Yellow Bell Gol Course", 1457.460, 2723.230, -89.084, 1534.560, 2863.230, 110.916)
- AddZone("The Strip", 2027.400, 1783.230, -89.084, 2162.390, 1863.230, 110.916)
- AddZone("Jefferson", 2056.860, -1210.740, -89.084, 2185.330, -1126.320, 110.916)
- AddZone("Mulholland", 952.604, -937.184, -89.084, 1096.470, -860.619, 110.916)
- AddZone("Aldea Malvada", -1372.140, 2498.520, 0.000, -1277.590, 2615.350, 200.000)
- AddZone("Las Colinas", 2126.860, -1126.320, -89.084, 2185.330, -934.489, 110.916)
- AddZone("Las Colinas", 1994.330, -1100.820, -89.084, 2056.860, -920.815, 110.916)
- AddZone("Richman", 647.557, -954.662, -89.084, 768.694, -860.619, 110.916)
- AddZone("LVA Freight Depot", 1277.050, 1087.630, -89.084, 1375.600, 1203.280, 110.916)
- AddZone("Julius Thruway North", 1377.390, 2433.230, -89.084, 1534.560, 2507.230, 110.916)
- AddZone("Willowfield", 2201.820, -2095.000, -89.084, 2324.000, -1989.900, 110.916)
- AddZone("Julius Thruway North", 1704.590, 2342.830, -89.084, 1848.400, 2433.230, 110.916)
- AddZone("Temple", 1252.330, -1130.850, -89.084, 1378.330, -1026.330, 110.916)
- AddZone("Little Mexico", 1701.900, -1842.270, -89.084, 1812.620, -1722.260, 110.916)
- AddZone("Queens", -2411.220, 373.539, 0.000, -2253.540, 458.411, 200.000)
- AddZone("Las Venturas Airport", 1515.810, 1586.400, -12.500, 1729.950, 1714.560, 87.500)
- AddZone("Richman", 225.165, -1292.070, -89.084, 466.223, -1235.070, 110.916)
- AddZone("Temple", 1252.330, -1026.330, -89.084, 1391.050, -926.999, 110.916)
- AddZone("East Los Santos", 2266.260, -1494.030, -89.084, 2381.680, -1372.040, 110.916)
- AddZone("Julius Thruway East", 2623.180, 943.235, -89.084, 2749.900, 1055.960, 110.916)
- AddZone("Willowfield", 2541.700, -1941.400, -89.084, 2703.580, -1852.870, 110.916)
- AddZone("Las Colinas", 2056.860, -1126.320, -89.084, 2126.860, -920.815, 110.916)
- AddZone("Julius Thruway East", 2625.160, 2202.760, -89.084, 2685.160, 2442.550, 110.916)
- AddZone("Rodeo", 225.165, -1501.950, -89.084, 334.503, -1369.620, 110.916)
- AddZone("Las Brujas", -365.167, 2123.010, -3.0, -208.570, 2217.680, 200.000)
- AddZone("Julius Thruway East", 2536.430, 2442.550, -89.084, 2685.160, 2542.550, 110.916)
- AddZone("Rodeo", 334.503, -1406.050, -89.084, 466.223, -1292.070, 110.916)
- AddZone("Vinewood", 647.557, -1227.280, -89.084, 787.461, -1118.280, 110.916)
- AddZone("Rodeo", 422.680, -1684.650, -89.084, 558.099, -1570.200, 110.916)
- AddZone("Julius Thruway North", 2498.210, 2542.550, -89.084, 2685.160, 2626.550, 110.916)
- AddZone("Downtown Los Santos", 1724.760, -1430.870, -89.084, 1812.620, -1250.900, 110.916)
- AddZone("Rodeo", 225.165, -1684.650, -89.084, 312.803, -1501.950, 110.916)
- AddZone("Jefferson", 2056.860, -1449.670, -89.084, 2266.210, -1372.040, 110.916)
- AddZone("Hampton Barns", 603.035, 264.312, 0.000, 761.994, 366.572, 200.000)
- AddZone("Temple", 1096.470, -1130.840, -89.084, 1252.330, -1026.330, 110.916)
- AddZone("Kincaid Bridge", -1087.930, 855.370, -89.084, -961.950, 986.281, 110.916)
- AddZone("Verona Beach", 1046.150, -1722.260, -89.084, 1161.520, -1577.590, 110.916)
- AddZone("Commerce", 1323.900, -1722.260, -89.084, 1440.900, -1577.590, 110.916)
- AddZone("Mulholland", 1357.000, -926.999, -89.084, 1463.900, -768.027, 110.916)
- AddZone("Rodeo", 466.223, -1570.200, -89.084, 558.099, -1385.070, 110.916)
- AddZone("Mulholland", 911.802, -860.619, -89.084, 1096.470, -768.027, 110.916)
- AddZone("Mulholland", 768.694, -954.662, -89.084, 952.604, -860.619, 110.916)
- AddZone("Julius Thruway South", 2377.390, 788.894, -89.084, 2537.390, 897.901, 110.916)
- AddZone("Idlewood", 1812.620, -1852.870, -89.084, 1971.660, -1742.310, 110.916)
- AddZone("Ocean Docks", 2089.000, -2394.330, -89.084, 2201.820, -2235.840, 110.916)
- AddZone("Commerce", 1370.850, -1577.590, -89.084, 1463.900, -1384.950, 110.916)
- AddZone("Julius Thruway North", 2121.400, 2508.230, -89.084, 2237.400, 2663.170, 110.916)
- AddZone("Temple", 1096.470, -1026.330, -89.084, 1252.330, -910.170, 110.916)
- AddZone("Glen Park", 1812.620, -1449.670, -89.084, 1996.910, -1350.720, 110.916)
- AddZone("Easter Bay Airport", -1242.980, -50.096, 0.000, -1213.910, 578.396, 200.000)
- AddZone("Martin Bridge", -222.179, 293.324, 0.000, -122.126, 476.465, 200.000)
- AddZone("The Strip", 2106.700, 1863.230, -89.084, 2162.390, 2202.760, 110.916)
- AddZone("Willowfield", 2541.700, -2059.230, -89.084, 2703.580, -1941.400, 110.916)
- AddZone("Marina", 807.922, -1577.590, -89.084, 926.922, -1416.250, 110.916)
- AddZone("Las Venturas Airport", 1457.370, 1143.210, -89.084, 1777.400, 1203.280, 110.916)
- AddZone("Idlewood", 1812.620, -1742.310, -89.084, 1951.660, -1602.310, 110.916)
- AddZone("Esplanade East", -1580.010, 1025.980, -6.1, -1499.890, 1274.260, 200.000)
- AddZone("Downtown Los Santos", 1370.850, -1384.950, -89.084, 1463.900, -1170.870, 110.916)
- AddZone("The Mako Span", 1664.620, 401.750, 0.000, 1785.140, 567.203, 200.000)
- AddZone("Rodeo", 312.803, -1684.650, -89.084, 422.680, -1501.950, 110.916)
- AddZone("Pershing Square", 1440.900, -1722.260, -89.084, 1583.500, -1577.590, 110.916)
- AddZone("Mulholland", 687.802, -860.619, -89.084, 911.802, -768.027, 110.916)
- AddZone("Gant Bridge", -2741.070, 1490.470, -6.1, -2616.400, 1659.680, 200.000)
- AddZone("Las Colinas", 2185.330, -1154.590, -89.084, 2281.450, -934.489, 110.916)
- AddZone("Mulholland", 1169.130, -910.170, -89.084, 1318.130, -768.027, 110.916)
- AddZone("Julius Thruway North", 1938.800, 2508.230, -89.084, 2121.400, 2624.230, 110.916)
- AddZone("Commerce", 1667.960, -1577.590, -89.084, 1812.620, -1430.870, 110.916)
- AddZone("Rodeo", 72.648, -1544.170, -89.084, 225.165, -1404.970, 110.916)
- AddZone("Roca Escalante", 2536.430, 2202.760, -89.084, 2625.160, 2442.550, 110.916)
- AddZone("Rodeo", 72.648, -1684.650, -89.084, 225.165, -1544.170, 110.916)
- AddZone("Market", 952.663, -1310.210, -89.084, 1072.660, -1130.850, 110.916)
- AddZone("Las Colinas", 2632.740, -1135.040, -89.084, 2747.740, -945.035, 110.916)
- AddZone("Mulholland", 861.085, -674.885, -89.084, 1156.550, -600.896, 110.916)
- AddZone("King's", -2253.540, 373.539, -9.1, -1993.280, 458.411, 200.000)
- AddZone("Redsands East", 1848.400, 2342.830, -89.084, 2011.940, 2478.490, 110.916)
- AddZone("Downtown", -1580.010, 744.267, -6.1, -1499.890, 1025.980, 200.000)
- AddZone("Conference Center", 1046.150, -1804.210, -89.084, 1323.900, -1722.260, 110.916)
- AddZone("Richman", 647.557, -1118.280, -89.084, 787.461, -954.662, 110.916)
- AddZone("Ocean Flats", -2994.490, 277.411, -9.1, -2867.850, 458.411, 200.000)
- AddZone("Greenglass College", 964.391, 930.890, -89.084, 1166.530, 1044.690, 110.916)
- AddZone("Glen Park", 1812.620, -1100.820, -89.084, 1994.330, -973.380, 110.916)
- AddZone("LVA Freight Depot", 1375.600, 919.447, -89.084, 1457.370, 1203.280, 110.916)
- AddZone("Regular Tom", -405.770, 1712.860, -3.0, -276.719, 1892.750, 200.000)
- AddZone("Verona Beach", 1161.520, -1722.260, -89.084, 1323.900, -1577.590, 110.916)
- AddZone("East Los Santos", 2281.450, -1372.040, -89.084, 2381.680, -1135.040, 110.916)
- AddZone("Caligula's Palace", 2137.400, 1703.230, -89.084, 2437.390, 1783.230, 110.916)
- AddZone("Idlewood", 1951.660, -1742.310, -89.084, 2124.660, -1602.310, 110.916)
- AddZone("Pilgrim", 2624.400, 1383.230, -89.084, 2685.160, 1783.230, 110.916)
- AddZone("Idlewood", 2124.660, -1742.310, -89.084, 2222.560, -1494.030, 110.916)
- AddZone("Queens", -2533.040, 458.411, 0.000, -2329.310, 578.396, 200.000)
- AddZone("Downtown", -1871.720, 1176.420, -4.5, -1620.300, 1274.260, 200.000)
- AddZone("Commerce", 1583.500, -1722.260, -89.084, 1758.900, -1577.590, 110.916)
- AddZone("East Los Santos", 2381.680, -1454.350, -89.084, 2462.130, -1135.040, 110.916)
- AddZone("Marina", 647.712, -1577.590, -89.084, 807.922, -1416.250, 110.916)
- AddZone("Richman", 72.648, -1404.970, -89.084, 225.165, -1235.070, 110.916)
- AddZone("Vinewood", 647.712, -1416.250, -89.084, 787.461, -1227.280, 110.916)
- AddZone("East Los Santos", 2222.560, -1628.530, -89.084, 2421.030, -1494.030, 110.916)
- AddZone("Rodeo", 558.099, -1684.650, -89.084, 647.522, -1384.930, 110.916)
- AddZone("Easter Tunnel", -1709.710, -833.034, -1.5, -1446.010, -730.118, 200.000)
- AddZone("Rodeo", 466.223, -1385.070, -89.084, 647.522, -1235.070, 110.916)
- AddZone("Redsands East", 1817.390, 2202.760, -89.084, 2011.940, 2342.830, 110.916)
- AddZone("The Clown's Pocket", 2162.390, 1783.230, -89.084, 2437.390, 1883.230, 110.916)
- AddZone("Idlewood", 1971.660, -1852.870, -89.084, 2222.560, -1742.310, 110.916)
- AddZone("Montgomery Intersection", 1546.650, 208.164, 0.000, 1745.830, 347.457, 200.000)
- AddZone("Willowfield", 2089.000, -2235.840, -89.084, 2201.820, -1989.900, 110.916)
- AddZone("Temple", 952.663, -1130.840, -89.084, 1096.470, -937.184, 110.916)
- AddZone("Prickle Pine", 1848.400, 2553.490, -89.084, 1938.800, 2863.230, 110.916)
- AddZone("Los Santos International", 1400.970, -2669.260, -39.084, 2189.820, -2597.260, 60.916)
- AddZone("Garver Bridge", -1213.910, 950.022, -89.084, -1087.930, 1178.930, 110.916)
- AddZone("Garver Bridge", -1339.890, 828.129, -89.084, -1213.910, 1057.040, 110.916)
- AddZone("Kincaid Bridge", -1339.890, 599.218, -89.084, -1213.910, 828.129, 110.916)
- AddZone("Kincaid Bridge", -1213.910, 721.111, -89.084, -1087.930, 950.022, 110.916)
- AddZone("Verona Beach", 930.221, -2006.780, -89.084, 1073.220, -1804.210, 110.916)
- AddZone("Verdant Bluffs", 1073.220, -2006.780, -89.084, 1249.620, -1842.270, 110.916)
- AddZone("Vinewood", 787.461, -1130.840, -89.084, 952.604, -954.662, 110.916)
- AddZone("Vinewood", 787.461, -1310.210, -89.084, 952.663, -1130.840, 110.916)
- AddZone("Commerce", 1463.900, -1577.590, -89.084, 1667.960, -1430.870, 110.916)
- AddZone("Market", 787.461, -1416.250, -89.084, 1072.660, -1310.210, 110.916)
- AddZone("Rockshore West", 2377.390, 596.349, -89.084, 2537.390, 788.894, 110.916)
- AddZone("Julius Thruway North", 2237.400, 2542.550, -89.084, 2498.210, 2663.170, 110.916)
- AddZone("East Beach", 2632.830, -1668.130, -89.084, 2747.740, -1393.420, 110.916)
- AddZone("Fallow Bridge", 434.341, 366.572, 0.000, 603.035, 555.680, 200.000)
- AddZone("Willowfield", 2089.000, -1989.900, -89.084, 2324.000, -1852.870, 110.916)
- AddZone("Chinatown", -2274.170, 578.396, -7.6, -2078.670, 744.170, 200.000)
- AddZone("El Castillo del Diablo", -208.570, 2337.180, 0.000, 8.430, 2487.180, 200.000)
- AddZone("Ocean Docks", 2324.000, -2145.100, -89.084, 2703.580, -2059.230, 110.916)
- AddZone("Easter Bay Chemicals", -1132.820, -768.027, 0.000, -956.476, -578.118, 200.000)
- AddZone("The Visage", 1817.390, 1703.230, -89.084, 2027.400, 1863.230, 110.916)
- AddZone("Ocean Flats", -2994.490, -430.276, -1.2, -2831.890, -222.589, 200.000)
- AddZone("Richman", 321.356, -860.619, -89.084, 687.802, -768.027, 110.916)
- AddZone("Green Palms", 176.581, 1305.450, -3.0, 338.658, 1520.720, 200.000)
- AddZone("Richman", 321.356, -768.027, -89.084, 700.794, -674.885, 110.916)
- AddZone("Starfish Casino", 2162.390, 1883.230, -89.084, 2437.390, 2012.180, 110.916)
- AddZone("East Beach", 2747.740, -1668.130, -89.084, 2959.350, -1498.620, 110.916)
- AddZone("Jefferson", 2056.860, -1372.040, -89.084, 2281.450, -1210.740, 110.916)
- AddZone("Downtown Los Santos", 1463.900, -1290.870, -89.084, 1724.760, -1150.870, 110.916)
- AddZone("Downtown Los Santos", 1463.900, -1430.870, -89.084, 1724.760, -1290.870, 110.916)
- AddZone("Garver Bridge", -1499.890, 696.442, -179.615, -1339.890, 925.353, 20.385)
- AddZone("Julius Thruway South", 1457.390, 823.228, -89.084, 2377.390, 863.229, 110.916)
- AddZone("East Los Santos", 2421.030, -1628.530, -89.084, 2632.830, -1454.350, 110.916)
- AddZone("Greenglass College", 964.391, 1044.690, -89.084, 1197.390, 1203.220, 110.916)
- AddZone("Las Colinas", 2747.740, -1120.040, -89.084, 2959.350, -945.035, 110.916)
- AddZone("Mulholland", 737.573, -768.027, -89.084, 1142.290, -674.885, 110.916)
- AddZone("Ocean Docks", 2201.820, -2730.880, -89.084, 2324.000, -2418.330, 110.916)
- AddZone("East Los Santos", 2462.130, -1454.350, -89.084, 2581.730, -1135.040, 110.916)
- AddZone("Ganton", 2222.560, -1722.330, -89.084, 2632.830, -1628.530, 110.916)
- AddZone("Avispa Country Club", -2831.890, -430.276, -6.1, -2646.400, -222.589, 200.000)
- AddZone("Willowfield", 1970.620, -2179.250, -89.084, 2089.000, -1852.870, 110.916)
- AddZone("Esplanade North", -1982.320, 1274.260, -4.5, -1524.240, 1358.900, 200.000)
- AddZone("The High Roller", 1817.390, 1283.230, -89.084, 2027.390, 1469.230, 110.916)
- AddZone("Ocean Docks", 2201.820, -2418.330, -89.084, 2324.000, -2095.000, 110.916)
- AddZone("Last Dime Motel", 1823.080, 596.349, -89.084, 1997.220, 823.228, 110.916)
- AddZone("Bayside Marina", -2353.170, 2275.790, 0.000, -2153.170, 2475.790, 200.000)
- AddZone("King's", -2329.310, 458.411, -7.6, -1993.280, 578.396, 200.000)
- AddZone("El Corona", 1692.620, -2179.250, -89.084, 1812.620, -1842.270, 110.916)
- AddZone("Blackfield Chapel", 1375.600, 596.349, -89.084, 1558.090, 823.228, 110.916)
- AddZone("The Pink Swan", 1817.390, 1083.230, -89.084, 2027.390, 1283.230, 110.916)
- AddZone("Julius Thruway West", 1197.390, 1163.390, -89.084, 1236.630, 2243.230, 110.916)
- AddZone("Los Flores", 2581.730, -1393.420, -89.084, 2747.740, -1135.040, 110.916)
- AddZone("The Visage", 1817.390, 1863.230, -89.084, 2106.700, 2011.830, 110.916)
- AddZone("Prickle Pine", 1938.800, 2624.230, -89.084, 2121.400, 2861.550, 110.916)
- AddZone("Verona Beach", 851.449, -1804.210, -89.084, 1046.150, -1577.590, 110.916)
- AddZone("Robada Intersection", -1119.010, 1178.930, -89.084, -862.025, 1351.450, 110.916)
- AddZone("Linden Side", 2749.900, 943.235, -89.084, 2923.390, 1198.990, 110.916)
- AddZone("Ocean Docks", 2703.580, -2302.330, -89.084, 2959.350, -2126.900, 110.916)
- AddZone("Willowfield", 2324.000, -2059.230, -89.084, 2541.700, -1852.870, 110.916)
- AddZone("King's", -2411.220, 265.243, -9.1, -1993.280, 373.539, 200.000)
- AddZone("Commerce", 1323.900, -1842.270, -89.084, 1701.900, -1722.260, 110.916)
- AddZone("Mulholland", 1269.130, -768.027, -89.084, 1414.070, -452.425, 110.916)
- AddZone("Marina", 647.712, -1804.210, -89.084, 851.449, -1577.590, 110.916)
- AddZone("Battery Point", -2741.070, 1268.410, -4.5, -2533.040, 1490.470, 200.000)
- AddZone("The Four Dragons Casino", 1817.390, 863.232, -89.084, 2027.390, 1083.230, 110.916)
- AddZone("Blackfield", 964.391, 1203.220, -89.084, 1197.390, 1403.220, 110.916)
- AddZone("Julius Thruway North", 1534.560, 2433.230, -89.084, 1848.400, 2583.230, 110.916)
- AddZone("Yellow Bell Gol Course", 1117.400, 2723.230, -89.084, 1457.460, 2863.230, 110.916)
- AddZone("Idlewood", 1812.620, -1602.310, -89.084, 2124.660, -1449.670, 110.916)
- AddZone("Redsands West", 1297.470, 2142.860, -89.084, 1777.390, 2243.230, 110.916)
- AddZone("Doherty", -2270.040, -324.114, -1.2, -1794.920, -222.589, 200.000)
- AddZone("Hilltop Farm", 967.383, -450.390, -3.0, 1176.780, -217.900, 200.000)
- AddZone("Las Barrancas", -926.130, 1398.730, -3.0, -719.234, 1634.690, 200.000)
- AddZone("Pirates in Men's Pants", 1817.390, 1469.230, -89.084, 2027.400, 1703.230, 110.916)
- AddZone("City Hall", -2867.850, 277.411, -9.1, -2593.440, 458.411, 200.000)
- AddZone("Avispa Country Club", -2646.400, -355.493, 0.000, -2270.040, -222.589, 200.000)
- AddZone("The Strip", 2027.400, 863.229, -89.084, 2087.390, 1703.230, 110.916)
- AddZone("Hashbury", -2593.440, -222.589, -1.0, -2411.220, 54.722, 200.000)
- AddZone("Los Santos International", 1852.000, -2394.330, -89.084, 2089.000, -2179.250, 110.916)
- AddZone("Whitewood Estates", 1098.310, 1726.220, -89.084, 1197.390, 2243.230, 110.916)
- AddZone("Sherman Reservoir", -789.737, 1659.680, -89.084, -599.505, 1929.410, 110.916)
- AddZone("El Corona", 1812.620, -2179.250, -89.084, 1970.620, -1852.870, 110.916)
- AddZone("Downtown", -1700.010, 744.267, -6.1, -1580.010, 1176.520, 200.000)
- AddZone("Foster Valley", -2178.690, -1250.970, 0.000, -1794.920, -1115.580, 200.000)
- AddZone("Las Payasadas", -354.332, 2580.360, 2.0, -133.625, 2816.820, 200.000)
- AddZone("Valle Ocultado", -936.668, 2611.440, 2.0, -715.961, 2847.900, 200.000)
- AddZone("Blackfield Intersection", 1166.530, 795.010, -89.084, 1375.600, 1044.690, 110.916)
- AddZone("Ganton", 2222.560, -1852.870, -89.084, 2632.830, -1722.330, 110.916)
- AddZone("Easter Bay Airport", -1213.910, -730.118, 0.000, -1132.820, -50.096, 200.000)
- AddZone("Redsands East", 1817.390, 2011.830, -89.084, 2106.700, 2202.760, 110.916)
- AddZone("Esplanade East", -1499.890, 578.396, -79.615, -1339.890, 1274.260, 20.385)
- AddZone("Caligula's Palace", 2087.390, 1543.230, -89.084, 2437.390, 1703.230, 110.916)
- AddZone("Royal Casino", 2087.390, 1383.230, -89.084, 2437.390, 1543.230, 110.916)
- AddZone("Richman", 72.648, -1235.070, -89.084, 321.356, -1008.150, 110.916)
- AddZone("Starfish Casino", 2437.390, 1783.230, -89.084, 2685.160, 2012.180, 110.916)
- AddZone("Mulholland", 1281.130, -452.425, -89.084, 1641.130, -290.913, 110.916)
- AddZone("Downtown", -1982.320, 744.170, -6.1, -1871.720, 1274.260, 200.000)
- AddZone("Hankypanky Point", 2576.920, 62.158, 0.000, 2759.250, 385.503, 200.000)
- AddZone("K.A.C.C. Military Fuels", 2498.210, 2626.550, -89.084, 2749.900, 2861.550, 110.916)
- AddZone("Harry Gold Parkway", 1777.390, 863.232, -89.084, 1817.390, 2342.830, 110.916)
- AddZone("Bayside Tunnel", -2290.190, 2548.290, -89.084, -1950.190, 2723.290, 110.916)
- AddZone("Ocean Docks", 2324.000, -2302.330, -89.084, 2703.580, -2145.100, 110.916)
- AddZone("Richman", 321.356, -1044.070, -89.084, 647.557, -860.619, 110.916)
- AddZone("Randolph Industrial Estate", 1558.090, 596.349, -89.084, 1823.080, 823.235, 110.916)
- AddZone("East Beach", 2632.830, -1852.870, -89.084, 2959.350, -1668.130, 110.916)
- AddZone("Flint Water", -314.426, -753.874, -89.084, -106.339, -463.073, 110.916)
- AddZone("Blueberry", 19.607, -404.136, 3.8, 349.607, -220.137, 200.000)
- AddZone("Linden Station", 2749.900, 1198.990, -89.084, 2923.390, 1548.990, 110.916)
- AddZone("Glen Park", 1812.620, -1350.720, -89.084, 2056.860, -1100.820, 110.916)
- AddZone("Downtown", -1993.280, 265.243, -9.1, -1794.920, 578.396, 200.000)
- AddZone("Redsands West", 1377.390, 2243.230, -89.084, 1704.590, 2433.230, 110.916)
- AddZone("Richman", 321.356, -1235.070, -89.084, 647.522, -1044.070, 110.916)
- AddZone("Gant Bridge", -2741.450, 1659.680, -6.1, -2616.400, 2175.150, 200.000)
- AddZone("Lil' Probe Inn", -90.218, 1286.850, -3.0, 153.859, 1554.120, 200.000)
- AddZone("Flint Intersection", -187.700, -1596.760, -89.084, 17.063, -1276.600, 110.916)
- AddZone("Las Colinas", 2281.450, -1135.040, -89.084, 2632.740, -945.035, 110.916)
- AddZone("Sobell Rail Yards", 2749.900, 1548.990, -89.084, 2923.390, 1937.250, 110.916)
- AddZone("The Emerald Isle", 2011.940, 2202.760, -89.084, 2237.400, 2508.230, 110.916)
- AddZone("El Castillo del Diablo", -208.570, 2123.010, -7.6, 114.033, 2337.180, 200.000)
- AddZone("Santa Flora", -2741.070, 458.411, -7.6, -2533.040, 793.411, 200.000)
- AddZone("Playa del Seville", 2703.580, -2126.900, -89.084, 2959.350, -1852.870, 110.916)
- AddZone("Market", 926.922, -1577.590, -89.084, 1370.850, -1416.250, 110.916)
- AddZone("Queens", -2593.440, 54.722, 0.000, -2411.220, 458.411, 200.000)
- AddZone("Pilson Intersection", 1098.390, 2243.230, -89.084, 1377.390, 2507.230, 110.916)
- AddZone("Spinybed", 2121.400, 2663.170, -89.084, 2498.210, 2861.550, 110.916)
- AddZone("Pilgrim", 2437.390, 1383.230, -89.084, 2624.400, 1783.230, 110.916)
- AddZone("Blackfield", 964.391, 1403.220, -89.084, 1197.390, 1726.220, 110.916)
- AddZone("'The Big Ear'", -410.020, 1403.340, -3.0, -137.969, 1681.230, 200.000)
- AddZone("Dillimore", 580.794, -674.885, -9.5, 861.085, -404.790, 200.000)
- AddZone("El Quebrados", -1645.230, 2498.520, 0.000, -1372.140, 2777.850, 200.000)
- AddZone("Esplanade North", -2533.040, 1358.900, -4.5, -1996.660, 1501.210, 200.000)
- AddZone("Easter Bay Airport", -1499.890, -50.096, -1.0, -1242.980, 249.904, 200.000)
- AddZone("Fisher's Lagoon", 1916.990, -233.323, -100.000, 2131.720, 13.800, 200.000)
- AddZone("Mulholland", 1414.070, -768.027, -89.084, 1667.610, -452.425, 110.916)
- AddZone("East Beach", 2747.740, -1498.620, -89.084, 2959.350, -1120.040, 110.916)
- AddZone("San Andreas Sound", 2450.390, 385.503, -100.000, 2759.250, 562.349, 200.000)
- AddZone("Shady Creeks", -2030.120, -2174.890, -6.1, -1820.640, -1771.660, 200.000)
- AddZone("Market", 1072.660, -1416.250, -89.084, 1370.850, -1130.850, 110.916)
- AddZone("Rockshore West", 1997.220, 596.349, -89.084, 2377.390, 823.228, 110.916)
- AddZone("Prickle Pine", 1534.560, 2583.230, -89.084, 1848.400, 2863.230, 110.916)
- AddZone("Easter Basin", -1794.920, -50.096, -1.04, -1499.890, 249.904, 200.000)
- AddZone("Leafy Hollow", -1166.970, -1856.030, 0.000, -815.624, -1602.070, 200.000)
- AddZone("LVA Freight Depot", 1457.390, 863.229, -89.084, 1777.400, 1143.210, 110.916)
- AddZone("Prickle Pine", 1117.400, 2507.230, -89.084, 1534.560, 2723.230, 110.916)
- AddZone("Blueberry", 104.534, -220.137, 2.3, 349.607, 152.236, 200.000)
- AddZone("El Castillo del Diablo", -464.515, 2217.680, 0.000, -208.570, 2580.360, 200.000)
- AddZone("Downtown", -2078.670, 578.396, -7.6, -1499.890, 744.267, 200.000)
- AddZone("Rockshore East", 2537.390, 676.549, -89.084, 2902.350, 943.235, 110.916)
- AddZone("San Fierro Bay", -2616.400, 1501.210, -3.0, -1996.660, 1659.680, 200.000)
- AddZone("Paradiso", -2741.070, 793.411, -6.1, -2533.040, 1268.410, 200.000)
- AddZone("The Camel's Toe", 2087.390, 1203.230, -89.084, 2640.400, 1383.230, 110.916)
- AddZone("Old Venturas Strip", 2162.390, 2012.180, -89.084, 2685.160, 2202.760, 110.916)
- AddZone("Juniper Hill", -2533.040, 578.396, -7.6, -2274.170, 968.369, 200.000)
- AddZone("Juniper Hollow", -2533.040, 968.369, -6.1, -2274.170, 1358.900, 200.000)
- AddZone("Roca Escalante", 2237.400, 2202.760, -89.084, 2536.430, 2542.550, 110.916)
- AddZone("Julius Thruway East", 2685.160, 1055.960, -89.084, 2749.900, 2626.550, 110.916)
- AddZone("Verona Beach", 647.712, -2173.290, -89.084, 930.221, -1804.210, 110.916)
- AddZone("Foster Valley", -2178.690, -599.884, -1.2, -1794.920, -324.114, 200.000)
- AddZone("Arco del Oeste", -901.129, 2221.860, 0.000, -592.090, 2571.970, 200.000)
- AddZone("Fallen Tree", -792.254, -698.555, -5.3, -452.404, -380.043, 200.000)
- AddZone("The Farm", -1209.670, -1317.100, 114.981, -908.161, -787.391, 251.981)
- AddZone("The Sherman Dam", -968.772, 1929.410, -3.0, -481.126, 2155.260, 200.000)
- AddZone("Esplanade North", -1996.660, 1358.900, -4.5, -1524.240, 1592.510, 200.000)
- AddZone("Financial", -1871.720, 744.170, -6.1, -1701.300, 1176.420, 300.000)
- AddZone("Garcia", -2411.220, -222.589, -1.14, -2173.040, 265.243, 200.000)
- AddZone("Montgomery", 1119.510, 119.526, -3.0, 1451.400, 493.323, 200.000)
- AddZone("Creek", 2749.900, 1937.250, -89.084, 2921.620, 2669.790, 110.916)
- AddZone("Los Santos International", 1249.620, -2394.330, -89.084, 1852.000, -2179.250, 110.916)
- AddZone("Santa Maria Beach", 72.648, -2173.290, -89.084, 342.648, -1684.650, 110.916)
- AddZone("Mulholland Intersection", 1463.900, -1150.870, -89.084, 1812.620, -768.027, 110.916)
- AddZone("Angel Pine", -2324.940, -2584.290, -6.1, -1964.220, -2212.110, 200.000)
- AddZone("Verdant Meadows", 37.032, 2337.180, -3.0, 435.988, 2677.900, 200.000)
- AddZone("Octane Springs", 338.658, 1228.510, 0.000, 664.308, 1655.050, 200.000)
- AddZone("Come-A-Lot", 2087.390, 943.235, -89.084, 2623.180, 1203.230, 110.916)
- AddZone("Redsands West", 1236.630, 1883.110, -89.084, 1777.390, 2142.860, 110.916)
- AddZone("Santa Maria Beach", 342.648, -2173.290, -89.084, 647.712, -1684.650, 110.916)
- AddZone("Verdant Bluffs", 1249.620, -2179.250, -89.084, 1692.620, -1842.270, 110.916)
- AddZone("Las Venturas Airport", 1236.630, 1203.280, -89.084, 1457.370, 1883.110, 110.916)
- AddZone("Flint Range", -594.191, -1648.550, 0.000, -187.700, -1276.600, 200.000)
- AddZone("Verdant Bluffs", 930.221, -2488.420, -89.084, 1249.620, -2006.780, 110.916)
- AddZone("Palomino Creek", 2160.220, -149.004, 0.000, 2576.920, 228.322, 200.000)
- AddZone("Ocean Docks", 2373.770, -2697.090, -89.084, 2809.220, -2330.460, 110.916)
- AddZone("Easter Bay Airport", -1213.910, -50.096, -4.5, -947.980, 578.396, 200.000)
- AddZone("Whitewood Estates", 883.308, 1726.220, -89.084, 1098.310, 2507.230, 110.916)
- AddZone("Calton Heights", -2274.170, 744.170, -6.1, -1982.320, 1358.900, 200.000)
- AddZone("Easter Basin", -1794.920, 249.904, -9.1, -1242.980, 578.396, 200.000)
- AddZone("Los Santos Inlet", -321.744, -2224.430, -89.084, 44.615, -1724.430, 110.916)
- AddZone("Doherty", -2173.040, -222.589, -1.0, -1794.920, 265.243, 200.000)
- AddZone("Mount Chiliad", -2178.690, -2189.910, -47.917, -2030.120, -1771.660, 576.083)
- AddZone("Fort Carson", -376.233, 826.326, -3.0, 123.717, 1220.440, 200.000)
- AddZone("Foster Valley", -2178.690, -1115.580, 0.000, -1794.920, -599.884, 200.000)
- AddZone("Ocean Flats", -2994.490, -222.589, -1.0, -2593.440, 277.411, 200.000)
- AddZone("Fern Ridge", 508.189, -139.259, 0.000, 1306.660, 119.526, 200.000)
- AddZone("Bayside", -2741.070, 2175.150, 0.000, -2353.170, 2722.790, 200.000)
- AddZone("Las Venturas Airport", 1457.370, 1203.280, -89.084, 1777.390, 1883.110, 110.916)
- AddZone("Blueberry Acres", -319.676, -220.137, 0.000, 104.534, 293.324, 200.000)
- AddZone("Palisades", -2994.490, 458.411, -6.1, -2741.070, 1339.610, 200.000)
- AddZone("North Rock", 2285.370, -768.027, 0.000, 2770.590, -269.740, 200.000)
- AddZone("Hunter Quarry", 337.244, 710.840, -115.239, 860.554, 1031.710, 203.761)
- AddZone("Los Santos International", 1382.730, -2730.880, -89.084, 2201.820, -2394.330, 110.916)
- AddZone("Missionary Hill", -2994.490, -811.276, 0.000, -2178.690, -430.276, 200.000)
- AddZone("San Fierro Bay", -2616.400, 1659.680, -3.0, -1996.660, 2175.150, 200.000)
- AddZone("Restricted Area", -91.586, 1655.050, -50.000, 421.234, 2123.010, 250.000)
- AddZone("Mount Chiliad", -2997.470, -1115.580, -47.917, -2178.690, -971.913, 576.083)
- AddZone("Mount Chiliad", -2178.690, -1771.660, -47.917, -1936.120, -1250.970, 576.083)
- AddZone("Easter Bay Airport", -1794.920, -730.118, -3.0, -1213.910, -50.096, 200.000)
- AddZone("The Panopticon", -947.980, -304.320, -1.1, -319.676, 327.071, 200.000)
- AddZone("Shady Creeks", -1820.640, -2643.680, -8.0, -1226.780, -1771.660, 200.000)
- AddZone("Back o Beyond", -1166.970, -2641.190, 0.000, -321.744, -1856.030, 200.000)
- AddZone("Mount Chiliad", -2994.490, -2189.910, -47.917, -2178.690, -1115.580, 576.083)
- AddZone("Tierra Robada", -1213.910, 596.349, -242.990, -480.539, 1659.680, 900.000)
- AddZone("Flint County", -1213.910, -2892.970, -242.990, 44.615, -768.027, 900.000)
- AddZone("Whetstone", -2997.470, -2892.970, -242.990, -1213.910, -1115.580, 900.000)
- AddZone("Bone County", -480.539, 596.349, -242.990, 869.461, 2993.870, 900.000)
- AddZone("Tierra Robada", -2997.470, 1659.680, -242.990, -480.539, 2993.870, 900.000)
- AddZone("San Fierro", -2997.470, -1115.580, -242.990, -1213.910, 1659.680, 900.000)
- AddZone("Las Venturas", 869.461, 596.349, -242.990, 2997.060, 2993.870, 900.000)
- AddZone("Red County", -1213.910, -768.027, -242.990, 2997.060, 596.349, 900.000)
- AddZone("Los Santos", 44.615, -2892.970, -242.990, 2997.060, -768.027, 900.000)
- }
- AddZone(sName, x1, y1, z1, x2, y2, z2) {
- global
- zone%nZone%_name := sName
- zone%nZone%_x1 := x1
- zone%nZone%_y1 := y1
- zone%nZone%_z1 := z1
- zone%nZone%_x2 := x2
- zone%nZone%_y2 := y2
- zone%nZone%_z2 := z2
- nZone := nZone + 1
- }
- AddCity(sName, x1, y1, z1, x2, y2, z2) {
- global
- city%nCity%_name := sName
- city%nCity%_x1 := x1
- city%nCity%_y1 := y1
- city%nCity%_z1 := z1
- city%nCity%_x2 := x2
- city%nCity%_y2 := y2
- city%nCity%_z2 := z2
- nCity := nCity + 1
- }
- checkHandles() {
- if(iRefreshHandles+500>A_TickCount)
- return true
- iRefreshHandles:=A_TickCount
- if(!refreshGTA() || !refreshSAMP() || !refreshMemory()) {
- return false
- } else {
- return true
- }
- return true
- }
- refreshGTA() {
- newPID := getPID("GTA:SA:MP")
- if(!newPID) {
- if(hGTA) {
- virtualFreeEx(hGTA, pMemory, 0, 0x8000)
- closeProcess(hGTA)
- hGTA := 0x0
- }
- dwGTAPID := 0
- hGTA := 0x0
- dwSAMP := 0x0
- pMemory := 0x0
- return false
- }
- if(!hGTA || (dwGTAPID != newPID)) {
- hGTA := openProcess(newPID)
- if(ErrorLevel) {
- dwGTAPID := 0
- hGTA := 0x0
- dwSAMP := 0x0
- pMemory := 0x0
- return false
- }
- dwGTAPID := newPID
- dwSAMP := 0x0
- pMemory := 0x0
- return true
- }
- return true
- }
- refreshSAMP() {
- if(dwSAMP)
- return true
- dwSAMP := getModuleBaseAddress("samp.dll", hGTA)
- if(!dwSAMP)
- return false
- return true
- }
- refreshMemory() {
- if(!pMemory) {
- pMemory := virtualAllocEx(hGTA, 4096, 0x1000 | 0x2000, 0x40)
- if(ErrorLevel) {
- pMemory := 0x0
- return false
- }
- pParam1 := pMemory
- pParam2 := pMemory + 1024
- pParam3 := pMemory + 2048
- pInjectFunc := pMemory + 3072
- }
- return true
- }
- getPID(szWindow) {
- local dwPID := 0
- WinGet, dwPID, PID, %szWindow%
- return dwPID
- }
- openProcess(dwPID, dwRights = 0x1F0FFF) {
- hProcess := DllCall("OpenProcess"
- , "UInt", dwRights
- , "int", 0
- , "UInt", dwPID
- , "Uint")
- if(hProcess == 0) {
- ErrorLevel := ERROR_OPEN_PROCESS
- return 0
- }
- ErrorLevel := ERROR_OK
- return hProcess
- }
- closeProcess(hProcess) {
- if(hProcess == 0) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "CloseHandle"
- , "Uint", hProcess
- , "UInt")
- ErrorLevel := ERROR_OK
- }
- getModuleBaseAddress(sModule, hProcess) {
- if(!sModule) {
- ErrorLevel := ERROR_MODULE_NOT_FOUND
- return 0
- }
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwSize = 1024*4
- VarSetCapacity(hMods, dwSize)
- VarSetCapacity(cbNeeded, 4)
- dwRet := DllCall( "Psapi.dll\EnumProcessModules"
- , "UInt", hProcess
- , "UInt", &hMods
- , "UInt", dwSize
- , "UInt*", cbNeeded
- , "UInt")
- if(dwRet == 0) {
- ErrorLevel := ERROR_ENUM_PROCESS_MODULES
- return 0
- }
- dwMods := cbNeeded / 4
- i := 0
- VarSetCapacity(hModule, 4)
- VarSetCapacity(sCurModule, 260)
- while(i < dwMods) {
- hModule := NumGet(hMods, i*4)
- DllCall("Psapi.dll\GetModuleFileNameEx"
- , "UInt", hProcess
- , "UInt", hModule
- , "Str", sCurModule
- , "UInt", 260)
- SplitPath, sCurModule, sFilename
- if(sModule == sFilename) {
- ErrorLevel := ERROR_OK
- return hModule
- }
- i := i + 1
- }
- ErrorLevel := ERROR_MODULE_NOT_FOUND
- return 0
- }
- readString(hProcess, dwAddress, dwLen) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(sRead, dwLen)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", sRead
- , "UInt", dwLen
- , "UInt*", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- if A_IsUnicode
- return __ansiToUnicode(sRead)
- return sRead
- }
- readFloat(hProcess, dwAddress) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(dwRead, 4)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", dwRead
- , "UInt", 4
- , "UInt*", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return NumGet(dwRead, 0, "Float")
- }
- readDWORD(hProcess, dwAddress) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(dwRead, 4)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", dwRead
- , "UInt", 4
- , "UInt*", 0)
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return NumGet(dwRead, 0, "UInt")
- }
- readMem(hProcess, dwAddress, dwLen=4, type="UInt") {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(dwRead, dwLen)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", dwRead
- , "UInt", dwLen
- , "UInt*", 0)
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return NumGet(dwRead, 0, type)
- }
- writeString(hProcess, dwAddress, wString) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return false
- }
- sString := wString
- if A_IsUnicode
- sString := __unicodeToAnsi(wString)
- dwRet := DllCall( "WriteProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", sString
- , "UInt", StrLen(wString) + 1
- , "UInt", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_WRITE_MEMORY
- return false
- }
- ErrorLevel := ERROR_OK
- return true
- }
- writeRaw(hProcess, dwAddress, pBuffer, dwLen) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return false
- }
- dwRet := DllCall( "WriteProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "UInt", pBuffer
- , "UInt", dwLen
- , "UInt", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_WRITE_MEMORY
- return false
- }
- ErrorLevel := ERROR_OK
- return true
- }
- callWithParams(hProcess, dwFunc, aParams, bCleanupStack = true) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return false
- }
- validParams := 0
- i := aParams.MaxIndex()
- dwLen := i * 5 + 5 + 1
- if(bCleanupStack)
- dwLen += 3
- VarSetCapacity(injectData, i * 5 + 5 + 3 + 1, 0)
- i_ := 1
- while(i > 0) {
- if(aParams[i][1] != "") {
- dwMemAddress := 0x0
- if(aParams[i][1] == "p") {
- dwMemAddress := aParams[i][2]
- } else if(aParams[i][1] == "s") {
- if(i_>3)
- return false
- dwMemAddress := pParam%i_%
- writeString(hProcess, dwMemAddress, aParams[i][2])
- if(ErrorLevel)
- return false
- i_ += 1
- } else if(aParams[i][1] == "i") {
- dwMemAddress := aParams[i][2]
- } else {
- return false
- }
- NumPut(0x68, injectData, validParams * 5, "UChar")
- NumPut(dwMemAddress, injectData, validParams * 5 + 1, "UInt")
- validParams += 1
- }
- i -= 1
- }
- offset := dwFunc - ( pInjectFunc + validParams * 5 + 5 )
- NumPut(0xE8, injectData, validParams * 5, "UChar")
- NumPut(offset, injectData, validParams * 5 + 1, "Int")
- if(bCleanupStack) {
- NumPut(0xC483, injectData, validParams * 5 + 5, "UShort")
- NumPut(validParams*4, injectData, validParams * 5 + 7, "UChar")
- NumPut(0xC3, injectData, validParams * 5 + 8, "UChar")
- } else {
- NumPut(0xC3, injectData, validParams * 5 + 5, "UChar")
- }
- writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- return true
- }
- virtualAllocEx(hProcess, dwSize, flAllocationType, flProtect) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "VirtualAllocEx"
- , "UInt", hProcess
- , "UInt", 0
- , "UInt", dwSize
- , "UInt", flAllocationType
- , "UInt", flProtect
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_ALLOC_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- virtualFreeEx(hProcess, lpAddress, dwSize, dwFreeType) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "VirtualFreeEx"
- , "UInt", hProcess
- , "UInt", lpAddress
- , "UInt", dwSize
- , "UInt", dwFreeType
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_FREE_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- createRemoteThread(hProcess, lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "CreateRemoteThread"
- , "UInt", hProcess
- , "UInt", lpThreadAttributes
- , "UInt", dwStackSize
- , "UInt", lpStartAddress
- , "UInt", lpParameter
- , "UInt", dwCreationFlags
- , "UInt", lpThreadId
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_ALLOC_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- waitForSingleObject(hThread, dwMilliseconds) {
- if(!hThread) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "WaitForSingleObject"
- , "UInt", hThread
- , "UInt", dwMilliseconds
- , "UInt")
- if(dwRet == 0xFFFFFFFF) {
- ErrorLEvel := ERROR_WAIT_FOR_OBJECT
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- __ansiToUnicode(sString, nLen = 0) {
- If !nLen
- {
- nLen := DllCall("MultiByteToWideChar"
- , "Uint", 0
- , "Uint", 0
- , "Uint", &sString
- , "int", -1
- , "Uint", 0
- , "int", 0)
- }
- VarSetCapacity(wString, nLen * 2)
- DllCall("MultiByteToWideChar"
- , "Uint", 0
- , "Uint", 0
- , "Uint", &sString
- , "int", -1
- , "Uint", &wString
- , "int", nLen)
- return wString
- }
- __unicodeToAnsi(wString, nLen = 0) {
- pString := wString + 1 > 65536 ? wString : &wString
- If !nLen
- {
- nLen := DllCall("WideCharToMultiByte"
- , "Uint", 0
- , "Uint", 0
- , "Uint", pString
- , "int", -1
- , "Uint", 0
- , "int", 0
- , "Uint", 0
- , "Uint", 0)
- }
- VarSetCapacity(sString, nLen)
- DllCall("WideCharToMultiByte"
- , "Uint", 0
- , "Uint", 0
- , "Uint", pString
- , "int", -1
- , "str", sString
- , "int", nLen
- , "Uint", 0
- , "Uint", 0)
- return sString
- }
- Ping(strHost)
- {
- Loop 4
- bRet := ComObjGet("winmgmts:").Get("Win32_PingStatus.address='" . strHost . "'").StatusCode = 0
- until bRet
- return bRet
- }
- Utf8ToAnsi(ByRef Utf8String, CodePage = 1251)
- {
- If (NumGet(Utf8String) & 0xFFFFFF) = 0xBFBBEF
- BOM = 3
- Else
- BOM = 0
- UniSize := DllCall("MultiByteToWideChar", "UInt", 65001, "UInt", 0
- , "UInt", &Utf8String + BOM, "Int", -1
- , "Int", 0, "Int", 0)
- VarSetCapacity(UniBuf, UniSize * 2)
- DllCall("MultiByteToWideChar", "UInt", 65001, "UInt", 0
- , "UInt", &Utf8String + BOM, "Int", -1
- , "UInt", &UniBuf, "Int", UniSize)
- AnsiSize := DllCall("WideCharToMultiByte", "UInt", CodePage, "UInt", 0
- , "UInt", &UniBuf, "Int", -1
- , "Int", 0, "Int", 0
- , "Int", 0, "Int", 0)
- VarSetCapacity(AnsiString, AnsiSize)
- DllCall("WideCharToMultiByte", "UInt", CodePage, "UInt", 0
- , "UInt", &UniBuf, "Int", -1
- , "Str", AnsiString, "Int", AnsiSize
- , "Int", 0, "Int", 0)
- Return AnsiString
- }
- FileInstall, C:\Users\DUGINI.DUGINI-PC\Desktop\AHK\VKsamp\vksamp.dll, %A_Temp%\vksamp.dll, 1
- path = %A_Temp%\vksamp.dll
- PATH_SAMP_API := PathCombine(A_ScriptDir, path)
- hModule := DllCall("LoadLibrary", Str, PATH_SAMP_API)
- if(hModule == -1 || hModule == 0)
- {
- MsgBox, 48, Ошибка #32, Что-то пошло не так, эта ошибка вообще не должна появляться :С`nПерезапуститесь и сообщите разработчику скрипта, если ошибка повторится.`nСкрипт запустится, но просмотр фотографий работать не будет.
- goto, gui
- }
- Init_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "Init")
- SetParam_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetParam")
- IsMenuOpen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsMenuOpen")
- WorldToScreen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "WorldToScreen")
- GetPlayerCPed_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerCPed")
- GetPlayerHealth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerHealth")
- GetPlayerArmor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerArmor")
- GetPlayerMoney_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerMoney")
- GetPlayerSkinID_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerSkinID")
- GetPlayerWeaponID_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponID")
- GetPlayerWeaponType_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponType")
- IsPlayerInAnyVehicle_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInAnyVehicle")
- IsPlayerDriver_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerDriver")
- IsPlayerPassenger_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerPassenger")
- IsPlayerInInterior_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInInterior")
- GetPlayerX_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerX")
- GetPlayerY_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerY")
- GetPlayerZ_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerZ")
- GetPlayerPosition_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerPosition")
- IsPlayerInRange2D_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInRange2D")
- IsPlayerInRange3D_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInRange3D")
- GetCityName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetCityName")
- GetZoneName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetZoneName")
- TextCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextCreate")
- TextDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextDestroy")
- TextSetShadow_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetShadow")
- TextSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetShown")
- TextSetColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetColor")
- TextSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetPos")
- TextSetString_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetString")
- TextUpdate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextUpdate")
- BoxCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxCreate")
- BoxDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxDestroy")
- BoxSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetShown")
- BoxSetBorder_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetBorder")
- BoxSetBorderColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetBorderColor")
- BoxSetColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetColor")
- BoxSetHeight_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetHeight")
- BoxSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetPos")
- BoxSetWidth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetWidth")
- LineCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineCreate")
- LineDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineDestroy")
- LineSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetShown")
- LineSetColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetColor")
- LineSetWidth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetWidth")
- LineSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetPos")
- ImageCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageCreate")
- ImageDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageDestroy")
- ImageSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetShown")
- ImageSetAlign_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetAlign")
- ImageSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetPos")
- ImageSetRotation_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetRotation")
- DestroyAllVisual_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "DestroyAllVisual")
- ShowAllVisual_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ShowAllVisual")
- HideAllVisual_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "HideAllVisual")
- GetFrameRate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetFrameRate")
- GetScreenSpecs_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetScreenSpecs")
- SetCalculationRatio_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetCalculationRatio")
- SetOverlayPriority_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetOverlayPriority")
- SetOverlayCalculationEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetOverlayCalculationEnabled")
- SendChat_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SendChat")
- ShowGameText_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ShowGameText")
- AddChatMessage_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "AddChatMessage")
- GetPlayerNameByID_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerNameByID")
- GetPlayerIDByName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerIDByName")
- IsChatOpen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsChatOpen")
- IsDialogOpen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsDialogOpen")
- GetVehiclePointer_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehiclePointer")
- GetVehicleSpeed_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleSpeed")
- GetVehicleHealth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleHealth")
- GetVehicleModelId_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleModelId")
- GetVehicleModelName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleModelName")
- GetVehicleModelNameById_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleModelNameById")
- GetVehicleType_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleType")
- GetVehicleFreeSeats_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleFreeSeats")
- GetVehicleFirstColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleFirstColor")
- GetVehicleSecondColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleSecondColor")
- GetVehicleColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleColor")
- IsVehicleSeatUsed_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleSeatUsed")
- IsVehicleLocked_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleLocked")
- IsVehicleHornEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleHornEnabled")
- IsVehicleSirenEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleSirenEnabled")
- IsVehicleAlternateSirenEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleAlternateSirenEnabled")
- IsVehicleEngineEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleEngineEnabled")
- IsVehicleLightEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleLightEnabled")
- IsVehicleCar_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleCar")
- IsVehiclePlane_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehiclePlane")
- IsVehicleBoat_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleBoat")
- IsVehicleTrain_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleTrain")
- IsVehicleBike_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleBike")
- Init()
- {
- global Init_func
- return DllCall(Init_func)
- }
- SetParam(_szParamName, _szParamValue)
- {
- global SetParam_func
- return DllCall(SetParam_func, "Str", _szParamName, "Str", _szParamValue)
- }
- IsMenuOpen()
- {
- global IsMenuOpen_func
- return DllCall(IsMenuOpen_func)
- }
- WorldToScreen(x, y, z, ByRef screenX, ByRef screenY)
- {
- global WorldToScreen_func
- return DllCall(WorldToScreen_func, "Float", x, "Float", y, "Float", z, "FloatP", screenX, "FloatP", screenY)
- }
- GetPlayerCPed()
- {
- global GetPlayerCPed_func
- return DllCall(GetPlayerCPed_func)
- }
- GetPlayerX(ByRef posX)
- {
- global GetPlayerX_func
- return DllCall(GetPlayerX_func, "FloatP", posX)
- }
- GetPlayerY(ByRef posY)
- {
- global GetPlayerY_func
- return DllCall(GetPlayerY_func, "FloatP", posY)
- }
- GetPlayerZ(ByRef posZ)
- {
- global GetPlayerZ_func
- return DllCall(GetPlayerZ_func, "FloatP", posZ)
- }
- GetPlayerPosition(ByRef posX, ByRef posY, ByRef posZ)
- {
- global GetPlayerPosition_func
- return DllCall(GetPlayerPosition_func, "FloatP", posX, "FloatP", posY, "FloatP", posZ)
- }
- IsPlayerInRange2D(posX, posY, radius)
- {
- global IsPlayerInRange2D_func
- return DllCall(IsPlayerInRange2D_func, "Float", posX, "Float", posY, "Float", radius)
- }
- IsPlayerInRange3D(posX, posY, posZ, radius)
- {
- global IsPlayerInRange3D_func
- return DllCall(IsPlayerInRange3D_func, "Float", posX, "Float", posY, "Float", posZ, "Float", radius)
- }
- GetCityName(ByRef cityName, max_len)
- {
- global GetCityName_func
- VarSetCapacity(cityName, 32, 0)
- return DllCall(GetCityName_func, "StrP", cityName, "Int", max_len)
- }
- GetZoneName(ByRef zoneName, max_len)
- {
- global GetZoneName_func
- VarSetCapacity(zoneName, 32, 0)
- return DllCall(GetZoneName_func, "StrP", zoneName, "Int", max_len)
- }
- TextCreate(Font, FontSize, bBold, bItalic, x, y, color, text, bShadow, bShow)
- {
- global TextCreate_func
- return DllCall(TextCreate_func, "Str", Font, "Int", FontSize, "UChar", bBold, "UChar", bItalic, "Int", x, "Int", y, "UInt", color, "Str", text, "UChar", bShadow, "UChar", bShow)
- }
- TextDestroy(ID)
- {
- global TextDestroy_func
- return DllCall(TextDestroy_func, "Int", ID)
- }
- TextSetShadow(id, b)
- {
- global TextSetShadow_func
- return DllCall(TextSetShadow_func, "Int", id, "UChar", b)
- }
- TextSetShown(id, b)
- {
- global TextSetShown_func
- return DllCall(TextSetShown_func, "Int", id, "UChar", b)
- }
- TextSetColor(id, color)
- {
- global TextSetColor_func
- return DllCall(TextSetColor_func, "Int", id, "UInt", color)
- }
- TextSetPos(id, x, y)
- {
- global TextSetPos_func
- return DllCall(TextSetPos_func, "Int", id, "Int", x, "Int", y)
- }
- TextSetString(id, str)
- {
- global TextSetString_func
- return DllCall(TextSetString_func, "Int", id, "Str", str)
- }
- TextUpdate(id, Font, FontSize, bBold, bItalic)
- {
- global TextUpdate_func
- return DllCall(TextUpdate_func, "Int", id, "Str", Font, "Int", FontSize, "UChar", bBold, "UChar", bItalic)
- }
- BoxCreate(x, y, w, h, dwColor, bShow)
- {
- global BoxCreate_func
- return DllCall(BoxCreate_func, "Int", x, "Int", y, "Int", w, "Int", h, "UInt", dwColor, "UChar", bShow)
- }
- BoxDestroy(id)
- {
- global BoxDestroy_func
- return DllCall(BoxDestroy_func, "Int", id)
- }
- BoxSetShown(id, bShown)
- {
- global BoxSetShown_func
- return DllCall(BoxSetShown_func, "Int", id, "UChar", bShown)
- }
- BoxSetBorder(id, height, bShown)
- {
- global BoxSetBorder_func
- return DllCall(BoxSetBorder_func, "Int", id, "Int", height, "UChar", bShown)
- }
- BoxSetBorderColor(id, dwColor)
- {
- global BoxSetBorderColor_func
- return DllCall(BoxSetBorderColor_func, "Int", id, "UInt", dwColor)
- }
- BoxSetColor(id, dwColor)
- {
- global BoxSetColor_func
- return DllCall(BoxSetColor_func, "Int", id, "UInt", dwColor)
- }
- BoxSetHeight(id, height)
- {
- global BoxSetHeight_func
- return DllCall(BoxSetHeight_func, "Int", id, "Int", height)
- }
- BoxSetPos(id, x, y)
- {
- global BoxSetPos_func
- return DllCall(BoxSetPos_func, "Int", id, "Int", x, "Int", y)
- }
- BoxSetWidth(id, width)
- {
- global BoxSetWidth_func
- return DllCall(BoxSetWidth_func, "Int", id, "Int", width)
- }
- LineCreate(x1, y1, x2, y2, width, color, bShow)
- {
- global LineCreate_func
- return DllCall(LineCreate_func, "Int", x1, "Int", y1, "Int", x2, "Int", y2, "Int", width, "UInt", color, "UChar", bShow)
- }
- LineDestroy(id)
- {
- global LineDestroy_func
- return DllCall(LineDestroy_func, "Int", id)
- }
- LineSetShown(id, bShown)
- {
- global LineSetShown_func
- return DllCall(LineSetShown_func, "Int", id, "UChar", bShown)
- }
- LineSetColor(id, color)
- {
- global LineSetColor_func
- return DllCall(LineSetColor_func, "Int", id, "UInt", color)
- }
- LineSetWidth(id, width)
- {
- global LineSetWidth_func
- return DllCall(LineSetWidth_func, "Int", id, "Int", width)
- }
- LineSetPos(id, x1, y1, x2, y2)
- {
- global LineSetPos_func
- return DllCall(LineSetPos_func, "Int", id, "Int", x1, "Int", y1, "Int", x2, "Int", y2)
- }
- ImageCreate(path, x, y, rotation, align, bShow)
- {
- global ImageCreate_func
- return DllCall(ImageCreate_func, "Str", path, "Int", x, "Int", y, "Int", rotation, "Int", align, "UChar", bShow)
- }
- ImageDestroy(id)
- {
- global ImageDestroy_func
- return DllCall(ImageDestroy_func, "Int", id)
- }
- ImageSetShown(id, bShown)
- {
- global ImageSetShown_func
- return DllCall(ImageSetShown_func, "Int", id, "UChar", bShown)
- }
- ImageSetAlign(id, align)
- {
- global ImageSetAlign_func
- return DllCall(ImageSetAlign_func, "Int", id, "Int", align)
- }
- ImageSetPos(id, x, y)
- {
- global ImageSetPos_func
- return DllCall(ImageSetPos_func, "Int", id, "Int", x, "Int", y)
- }
- ImageSetRotation(id, rotation)
- {
- global ImageSetRotation_func
- return DllCall(ImageSetRotation_func, "Int", id, "Int", rotation)
- }
- DestroyAllVisual()
- {
- global DestroyAllVisual_func
- return DllCall(DestroyAllVisual_func)
- }
- ShowAllVisual()
- {
- global ShowAllVisual_func
- return DllCall(ShowAllVisual_func)
- }
- HideAllVisual()
- {
- global HideAllVisual_func
- return DllCall(HideAllVisual_func)
- }
- GetFrameRate()
- {
- global GetFrameRate_func
- return DllCall(GetFrameRate_func)
- }
- GetScreenSpecs(ByRef width, ByRef height)
- {
- global GetScreenSpecs_func
- return DllCall(GetScreenSpecs_func, "IntP", width, "IntP", height)
- }
- SetCalculationRatio(width, height)
- {
- global SetCalculationRatio_func
- return DllCall(SetCalculationRatio_func, "Int", width, "Int", height)
- }
- SetOverlayPriority(id, priority)
- {
- global SetOverlayPriority_func
- return DllCall(SetOverlayPriority_func, "Int", id, "Int", priority)
- }
- SetOverlayCalculationEnabled(id, enabled)
- {
- global SetOverlayCalculationEnabled_func
- return DllCall(SetOverlayCalculationEnabled_func, "Int", id, "UChar", enabled)
- }
- SendChat(msg)
- {
- global SendChat_func
- return DllCall(SendChat_func, "Str", msg)
- }
- PathCombine(abs, rel) {
- VarSetCapacity(dest, (A_IsUnicode ? 2 : 1) * 260, 1)
- DllCall("Shlwapi.dll\PathCombine", "UInt", &dest, "UInt", &abs, "UInt", &rel)
- Return, dest
- }
- #NoEnv
- #Persistent
- #NoTrayIcon
- #IfWinActive, GTA:SA:MP
- gui:
- kn = ИНСТРУКЦИЯ ПО АКТИВАЦИИ
- Gui, Destroy
- url_script := ""
- url_version := ""
- last_version := GetLastVersionSoft(url_version)
- FileInstall, C:\Users\DUGINI.DUGINI-PC\Desktop\AHK\VKsamp\gigig.png, %A_Temp%\autoadv3al.png, 1
- FileInstall, C:\Users\DUGINI.DUGINI-PC\Desktop\AHK\VKsamp\dadada.png, %A_Temp%\autoadv3ald.png, 1
- last_version = 0
- klav = F6
- log = 1
- RegRead, key, HKEY_CURRENT_USER, SoftWare\SAMP, tokenkey
- kn = АКТИВИРОВАТЬ TOKEN
- URLDownloadToFile, https://api.vk.com/method/messages.get.xml?v=5.74&access_token=%key%&count=1&preview_length=, %a_temp%/vk.txt
- FileReadLine, numb, %a_temp%/vk.txt, 3
- RegExMatch(numb, "<count>(.*)</count>", numb)
- lastmsg := % numb1
- if log = 1
- {
- if oneuse != 1
- {
- addMessageToChatWindow("{87CEFA}[VKsamp] {FFFFFF}VKsamp активирован! Приятного использования :)")
- }
- }
- Gui, Color, FFFFFF
- Gui, Font, s6
- textdd := "ALPHA V3 | BY ZEUSGANG"
- Gui, Add, Picture, x0 y0 w620 h369 , %A_Temp%\autoadv3al.png
- Gui, Add, Text, x95 y338 w120 h8 , %textdd%
- Gui, Font, S7 Bold, Tahoma
- Gui, Add, Button, x40 y174 w300 h40 gKnopka , %Kn%
- Gui, Add, Button, x40 y224 w300 h40 , ИНФОРМАЦИЯ
- Gui, Add, Button, x40 y274 w300 h40 , ПОЛУЧИТЬ TOKEN
- Gui, Add, Button, x265 y330 w74 h21 , КНОПКИ
- if log = 1
- {
- Gui, Add, Edit, x44 y140 w290 h20 vkey , %key%
- }
- else
- {
- Gui, Add, Edit, x44 y140 w290 h20 ReadOnly vkey , %key%
- }
- Gui, Show, w380 h369 Center, VKsamp
- if log = 1
- {
- if oneuse != 1
- {
- oneuse = 1
- settimer, update, 1000
- }
- }
- return
- Knopka:
- if log = 1
- {
- GuiControlGet, key
- RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\SAMP ,tokenkey , %key%
- If InStr(key, "access_token")
- {
- regexmatch(key, "access_token=(.*)&expires_in", key)
- RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\SAMP ,tokenkey , %key1%
- key := % key1
- }
- Reload
- }
- else
- {
- msgbox, , Активация скрипта, Доброго времени суток, новый пользователь!`nК сожалению, в данный момент скрипт еще на активирован на твоем компьютере.`nДля активации свяжись с автором скрипта. Он даст тебе инструкции.`nВК: || Skype:
- }
- Return
- ButtonКНОПКИ:
- goto, guiupr
- Return
- ButtonИНФОРМАЦИЯ:
- Msgbox, , Информация о скрипте, Ответ в игре с помощью команды:`n/vk [персональный id] [текст]`n`nВерсия скрипта: v3 Alpha`nby ZeusGang`n`nДата выпуска скрипта: 29.12.2015`nПоследнее обновление: 15.01.2016`nПри использовании VK api.
- Return
- ButtonПОЛУЧИТЬTOKEN:
- Clipboard = http://u.to/super_access_token/uVy-Bw
- msgbox, , Получение ключа, Шаг 1. В Ваш буфер обмена записана ссылка.`nШаг 2. Вставьте ссылку в браузер и перейдите по ней.`nШаг 3. Далее разрешите приложению доступ.`nШаг 4. Теперь в адресной строке появилась ссылка.`nШаг 5. Скопируйте адрес, который появился в адресной строке.`nШаг 5. Вставьте ссылку в окошко и нажмите "Активировать TOKEN".`n`n`nПоддерживаются как ссылки формата: http://api.vk.com/blank.html#access_token=ключ&expires_in=0&user_id=айди`nТак и сами TOKEN`ы.
- Return
- GuiClose:
- ExitApp
- guiupr:
- Gui, Destroy
- Gui, Font, S7 Bold, Tahoma
- Gui, Add, Picture, x0 y0 w253 h253 , %A_Temp%\autoadv3ald.png
- Gui, Show, w253 h300 Center, Управление
- Gui, Add, Button, x0 y253 w253 h47 , НАЗАД
- return
- ButtonНАЗАД:
- goto, gui
- return
- St:
- i = 380
- GuiControlGet, St
- if St = >>>
- {
- while (i <= 620)
- {
- gui, show, w%i% h369, VKsamp
- sleep, 10
- i += 10
- }
- GuiControl,, St, <<<
- }
- else
- {
- i = 620
- while (i >= 380)
- {
- gui, show, w%i% h369, VKsamp
- sleep, 10
- i -= 10
- }
- GuiControl,, St, >>>
- }
- Return
- update:
- sleep, 200
- URLDownloadToFile, https://api.vk.com/method/messages.get.xml?v=5.74&access_token=%key%&count=1, %a_temp%/vk.txt
- FileReadLine, numb, %a_temp%/vk.txt, 3
- RegExMatch(numb, "<count>(.*)</count>", numb)
- goto, msgchecker
- return
- checker:
- chat = 0
- smile = 0
- photo = 0
- audio = 0
- sticker = 0
- doc = 0
- video = 0
- point = 0
- kolvo = 0
- vk1 =
- vk2 =
- itogo = 0
- lastmsg := % numb1
- FileRead, Get, %A_Temp%/vk.txt
- Loop, parse, Get, `n`r
- {
- If InStr(A_LoopField, "<chat_id>")
- {
- RegExMatch(A_LoopField, "<chat_id>(.*)</chat_id>", chatid)
- chat = 1
- }
- If InStr(A_LoopField, "<type>point</type>")
- {
- point = 1
- kolvo += 1
- }
- If InStr(A_LoopField, "<type>sticker</type>")
- {
- sticker = 1
- }
- If InStr(A_LoopField, "<type>video</type>")
- {
- video = 1
- kolvo += 1
- }
- If InStr(A_LoopField, "<type>doc</type>")
- {
- doc = 1
- kolvo += 1
- }
- If InStr(A_LoopField, "<type>audio</type>")
- {
- audio = 1
- FileRead, Get2, %A_Temp%/vk.txt
- Loop, parse, Get2, `n`r
- {
- If InStr(A_LoopField, "<url>")
- {
- RegExMatch(A_LoopField, "<url>(.*)</url>", mus)
- }
- If InStr(A_LoopField, "<artist>")
- {
- RegExMatch(A_LoopField, "<artist>(.*)</artist>", art)
- StringLeft, art1, art1, 50
- art1 := Utf8ToAnsi(art1)
- }
- If InStr(A_LoopField, "<title>")
- {
- RegExMatch(A_LoopField, "<title>(.*)</title>", tit)
- StringLeft, tit1, tit1, 50
- tit1 := Utf8ToAnsi(tit1)
- }
- }
- kolvo += 1
- }
- If InStr(A_LoopField, "<type>photo</type>")
- {
- FileRead, Get3, %A_Temp%/vk.txt
- Loop, parse, Get3, `n`r
- {
- If InStr(A_LoopField, "<src_big>")
- {
- RegExMatch(A_LoopField, "<src_big>(.*)</src_big>", ph)
- }
- If InStr(A_LoopField, "<src_xbig>")
- {
- RegExMatch(A_LoopField, "<src_xbig>(.*)</src_xbig>", ph)
- }
- If InStr(A_LoopField, "<src_xxbig>")
- {
- RegExMatch(A_LoopField, "<src_xxbig>(.*)</src_xxbig>", ph)
- }
- }
- photo = 1
- kolvo += 1
- }
- If InStr(A_LoopField, "<emoji>")
- {
- RegExMatch(A_LoopField, "<emoji>(.*)</emoji>", smile)
- smile = 1
- }
- }
- FileReadLine, vk, %a_temp%/vk.txt, 11
- vk := Utf8ToAnsi(vk)
- FileReadLine, id, %a_temp%/vk.txt, 8
- id := Utf8ToAnsi(id)
- RegExMatch(id, "<uid>(.*)</uid>", id)
- IniRead, name, settings.ini, id, %id1%
- IniRead, idahk,settings.ini, IDforAHK, %id1%
- RegExMatch(vk, "<body>(.*)</body>", vk)
- if name = ERROR
- {
- URLDownloadToFile, https://api.vk.com/method/users.get.xml?v=5.74&user_ids=%id1%, %a_temp%/id.txt
- FileReadLine, first_name, %a_temp%/id.txt, 5
- first_name := Utf8ToAnsi(first_name)
- FileReadLine, last_name, %a_temp%/id.txt, 6
- last_name := Utf8ToAnsi(last_name)
- RegExMatch(first_name, "<first_name>(.*)</first_name>", first_name)
- RegExMatch(last_name, "<last_name>(.*)</last_name>", last_name)
- name = %first_name1% %last_name1%
- IniWrite,%name%,settings.ini, id, %id1%
- RegRead, ids, HKEY_CURRENT_USER, SoftWare\SAMP, idforvk
- ids += 1
- idahk := % ids
- RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\SAMP ,idforvk , %ids%
- IniWrite, %ids%, settings.ini, IDforAHK, %id1%
- IniWrite, %id1%, settings.ini, AHKforID, %ids%
- }
- if chat = 1
- {
- IniRead, idchat,settings.ini, DIALOGforAHK, %chatid1%
- if idchat = ERROR
- {
- RegRead, idc, HKEY_CURRENT_USER, SoftWare\SAMP, idfordialog
- idc += 1
- idchat := "" . idc . ""
- RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\SAMP ,idfordialog , %idc%
- IniWrite, %idc%, settings.ini, DIALOGforAHK, %chatid1%
- IniWrite, %chatid1%, settings.ini, AHKforDIALOG, %idc%
- }
- FileReadLine, nameof, %a_temp%/vk.txt, 10
- nameof := Utf8ToAnsi(nameof)
- RegExMatch(nameof, "<title>(.*)</title>", nameof)
- nameof := "[" . nameof1 . "]"
- idahk := "D" . idchat . ""
- }
- else
- {
- nameof =
- }
- if kolvo > 0
- {
- if vk1 !=
- {
- vk2 = Вложения:
- }
- }
- if smile = 1
- {
- vk1 = %vk1% [:)]
- }
- if sticker = 1
- {
- vk1 = СТИКЕР
- }
- if photo = 1
- {
- vk2 = %vk2% [ФОТО]
- }
- if doc = 1
- {
- vk2 = %vk2% [ДОКУМЕНТ]
- }
- if video = 1
- {
- vk2 = %vk2% [ВИДЕО]
- }
- if point = 1
- {
- vk2 = %vk2% [КАРТА]
- }
- if audio = 1
- {
- vk2 = %vk2% [A: %art1% - %tit1%]
- }
- if kolvo != 0
- {
- if vk1 !=
- {
- itogo = 1
- }
- }
- if vk1 =
- {
- vk1 := % vk2
- }
- StringReplace, vk1, vk1, ", ", All
- StringReplace, vk2, vk2, ", ", All
- StringReplace, vk1, vk1, &amp;, &, All
- StringReplace, vk2, vk2, &amp;, &, All
- StringReplace, vk1, vk1, <br>, , All
- StringReplace, vk2, vk2, <br>, , All
- msg = {87CEFA}[VKsamp] {FFFFFF}%name%%nameof%[%idahk%]: %vk1%
- StringLeft, msg, msg, 256
- addMessageToChatWindow("" . msg . "")
- if itogo = 1
- {
- addMessageToChatWindow("{87CEFA}[VKsamp] {FFFFFF}" . vk2 . "")
- }
- goto, update
- msgchecker:
- sleep, 200
- if klav != F6
- {
- if (isInChat()) != 1
- {
- dwAddress := dwSAMP + 0x12D8F8
- chatInput := readString(hGTA, dwAddress, 256)
- if ChatInput != Chatik
- {
- if RegExMatch(chatInput, "i)/vk ([0-999]) (.*)", z)
- {
- Chatik := % ChatInput
- zek := % z1
- IniRead, z1, settings.ini, AHKforID, %z1%
- IniRead, name, settings.ini, id, %z1%
- msg = {87CEFA}[VKsamp] {FFFFFF}[<---] %name%[%zek%]: %z2%
- VarSetCapacity(ansi, StrPut(z2, "UTF-8")), StrPut(z2, &ansi, "UTF-8")
- z2 := StrGet(&ansi, "cp0")
- URLDownloadToFile, https://api.vk.com/method/messages.send.xml?v=5.74&user_id=%z1%&message=%z2%&access_token=%key%, %a_temp%/msg.txt
- FileReadLine, err, %a_temp%/msg.txt, 2
- Klav = F6
- if err = <error>
- {
- goto, error
- }
- StringLeft, msg, msg, 90
- addMessageToChatWindow("" . msg . "")
- }
- if RegExMatch(chatInput, "i)/vk D([0-999]) (.*)", z)
- {
- Chatik := % ChatInput
- zek := % z1
- IniRead, z1, settings.ini, AHKforDIALOG, %z1%
- IniRead, name, settings.ini, id, %z1%
- msg = {87CEFA}[VKsamp] {FFFFFF}[<---] В диалог[D%zek%]: %z2%
- VarSetCapacity(ansi, StrPut(z2, "UTF-8")), StrPut(z2, &ansi, "UTF-8")
- z2 := StrGet(&ansi, "cp0")
- URLDownloadToFile, https://api.vk.com/method/messages.send.xml?v=5.74&chat_id=%z1%&message=%z2%&access_token=%key%, %a_temp%/msg.txt
- StringLeft, msg, msg, 90
- FileReadLine, err, %a_temp%/msg.txt, 2
- Klav = F6
- if err = <error>
- {
- goto, errord
- }
- addMessageToChatWindow("" . msg . "")
- }
- }
- }
- }
- goto, easychecker
- easychecker:
- if numb1 > % lastmsg
- {
- goto, checker
- }
- else
- {
- goto, update
- }
- Return
- error:
- sleep, 300
- URLDownloadToFile, https://api.vk.com/method/messages.send.xml?v=5.74&user_id=%z1%&message=%z2%&access_token=%key%, %a_temp%/msg.txt
- FileReadLine, err, %a_temp%/msg.txt, 2
- if err = <error>
- {
- goto, error
- }
- addMessageToChatWindow("" . msg . "")
- goto, easychecker
- errord:
- sleep, 300
- URLDownloadToFile, https://api.vk.com/method/messages.send.xml?v=5.74&chat_id=%z1%&message=%z2%&access_token=%key%, %a_temp%/msg.txt
- FileReadLine, err, %a_temp%/msg.txt, 2
- if err = <error>
- {
- goto, errord
- }
- addMessageToChatWindow("" . msg . "")
- goto, easychecker
- $~F6::
- Klav = F6
- Return
- $~Enter::
- if (isInChat()) != 0
- {
- Klav = Enter
- }
- Return
- NumPad1::
- URLDownloadToFile, %ph1%, %a_temp%/ph.png
- path = %a_temp%/ph.png
- img := ImageCreate(path, 0, 0, 0, 0, true)
- Return
- NumPad2::
- playAudioStream(mus1)
- Return
- NumPad5::
- stopAudioStream()
- Return
- NumPad4::
- HideAllVisual()
- Return
- GetLastVersionSoft(URL) {
- URLDownloadToFile, %URL%, %A_Temp%/79124
- FileRead, LastVersion, %A_Temp%/79124
- FileDelete, %A_Temp%/79124
- return LastVersion
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement