HOME FORUMS MEMBERS RECENT POSTS LOG IN  
× Авторизация
Имя пользователя:
Пароль:
Нет аккаунта? Регистрация
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ ЧАТ
loading...
Скрыть
Вернуться   ANTICHAT > ПРОГРАММИРОВАНИЕ > С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby
   
 
 
Опции темы Поиск в этой теме Опции просмотра

  #1  
Старый 02.01.2016, 00:08
mac
Познавший АНТИЧАТ
Регистрация: 06.09.2014
Сообщений: 1,317
С нами: 6148765

Репутация: 168


По умолчанию

В общем, данная херня работает, но криво. Когда захожу в игру - машины спавнятся, но в огромном количестве. Не понимаю, что не так сделал

C++:





Код:
#include "script.h"
#include 
#include 
void
lspd1cars
(
)
{
Vehicle police3Veh1
,
police3Veh2
,
police3Veh3
,
police3Veh4
,
police3Veh5
,
// Машины
policebVeh1
,
policebVeh2
,
policebVeh3
,
policeVeh1
,
policeVeh2
,
policeVeh3
,
police2Veh1
,
police2Veh2
,
polmavVeh1
,
polmavVeh2
,
policetVeh1
,
policetVeh2
;
int
police3Spawned
=
0
,
policebSpawned
=
0
,
policeSpawned
=
0
,
police2Spawned
=
0
,
polmavSpawned
=
0
,
policetSpawned
=
0
;
int
police3SpawnDistance
=
0
,
policebSpawnDistance
=
0
,
policeSpawnDistance
=
0
,
police2SpawnDistance
=
0
,
polmavSpawnDistance
=
0
,
policetSpawnDistance
=
0
;
Ped playerPed
=
PLAYER
::
PLAYER_PED_ID
(
)
;
Vehicle veh
=
PED
::
GET_VEHICLE_PED_IS_USING
(
playerPed
)
;
Vector3 position
=
ENTITY
::
GET_ENTITY_COORDS
(
playerPed
,
1
)
;
DWORD police3
=
GAMEPLAY
::
GET_HASH_KEY
(
"police3"
)
;
police3SpawnDistance
=
GAMEPLAY
::
GET_DISTANCE_BETWEEN_COORDS
(
408.203
,
-
988.917
,
29.021
,
position
.
x
,
position
.
y
,
position
.
z
,
0
)
;
if
(
police3SpawnDistance

100
&&
police3VehDistance
>
100
)
{
if
(
police3Spawned
==
5
)
{
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
police3Veh1
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
police3Veh2
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
police3Veh3
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
police3Veh4
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
police3Veh5
)
;
police3Spawned
-=
5
;
}
}
DWORD policeb
=
GAMEPLAY
::
GET_HASH_KEY
(
"policeb"
)
;
// Мотоцикл
policebSpawnDistance
=
GAMEPLAY
::
GET_DISTANCE_BETWEEN_COORDS
(
409.370
,
-
1004.351
,
28.742
,
position
.
x
,
position
.
y
,
position
.
z
,
0
)
;
if
(
policebSpawnDistance

100
&&
policebVehDistance
>
100
)
{
if
(
policebSpawned
==
3
)
{
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policebVeh1
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policebVeh2
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policebVeh3
)
;
policebSpawned
-=
3
;
}
}
DWORD police
=
GAMEPLAY
::
GET_HASH_KEY
(
"police"
)
;
// Stainer
policeSpawnDistance
=
GAMEPLAY
::
GET_DISTANCE_BETWEEN_COORDS
(
431.053
,
-
1026.89
,
28.518
,
position
.
x
,
position
.
y
,
position
.
z
,
0
)
;
if
(
policeSpawnDistance

100
&&
policeVehDistance
>
100
)
{
if
(
policeSpawned
==
3
)
{
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policeVeh1
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policeVeh2
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policeVeh3
)
;
policeSpawned
-=
3
;
}
}
DWORD police2
=
GAMEPLAY
::
GET_HASH_KEY
(
"police2"
)
;
// Buffalo
police2SpawnDistance
=
GAMEPLAY
::
GET_DISTANCE_BETWEEN_COORDS
(
442.408
,
-
1026.017
,
28.319
,
position
.
x
,
position
.
y
,
position
.
z
,
0
)
;
if
(
police2SpawnDistance

100
&&
police2VehDistance
>
100
)
{
if
(
police2Spawned
==
2
)
{
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
police2Veh1
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
police2Veh2
)
;
police2Spawned
-=
2
;
}
}
DWORD polmav
=
GAMEPLAY
::
GET_HASH_KEY
(
"polmav"
)
;
// Вертолет
polmavSpawnDistance
=
GAMEPLAY
::
GET_DISTANCE_BETWEEN_COORDS
(
482.948
,
-
982.156
,
41.395
,
position
.
x
,
position
.
y
,
position
.
z
,
0
)
;
if
(
polmavSpawnDistance

100
&&
polmavVehDistance
>
100
)
{
if
(
polmavSpawned
==
2
)
{
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
polmavVeh1
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
polmavVeh2
)
;
polmavSpawned
-=
2
;
}
}
DWORD policet
=
GAMEPLAY
::
GET_HASH_KEY
(
"policet"
)
;
// Автозак
policetSpawnDistance
=
GAMEPLAY
::
GET_DISTANCE_BETWEEN_COORDS
(
463.017
,
-
1014.739
,
28.063
,
position
.
x
,
position
.
y
,
position
.
z
,
0
)
;
if
(
policetSpawnDistance

100
&&
policеtVehDistance
>
100
)
{
if
(
policetSpawned
==
2
)
{
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policetVeh1
)
;
ENTITY
::
SET_VEHICLE_AS_NO_LONGER_NEEDED
(
&
policetVeh2
)
;
policetSpawned
-=
2
;
}
}
}
void
main
(
)
{
while
(
true
)
{
lspd1cars
(
)
;
WAIT
(
0
)
;
}
}
void
ScriptMain
(
)
{
srand
(
GetTickCount
(
)
)
;
main
(
)
;
}


п.с. Должен быть хотя бы один человек, который работает с этим апи
 
Ответить с цитированием
 





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT ™ © 2001- Antichat Kft.

×

Создать сделку

Продавец: ник или ID

Название сделки:

Сумма USDT:

Срок сделки, дней:

Кто платит комиссию:

Условия сделки:

После создания сделки средства будут зарезервированы в холде до завершения сделки.

×

Мои сделки

Загрузка...
×

Сделка


Загрузка чата...