Página 1 de 1
DronesRC Mod
Enviado: 20 Mai 2018, 16:38
por xXBrunoXx
Eae pessoas, a alguns meses atrás dei inicio aos tutoriais de criação de mods cleo do Junior na antiga BMS e de lá pra cá já deu pra brincar bastante com isso, já criei varios scripts
grande maioria inútil, mas esse foi o que mais se destacou, criei ele me inspirando no game WatchDogs 2 e num mod do AguiaX2 que ele acabou perdendo... O mod consiste em você poder controlar aqueles veículos RC do Zero sem aquelas frescuras de ficar dentro daquela van, tudo no estilo WatchDogs mas com certas limitações, até coloquei uma animação do proprio SanAndreas fazendo com que pareça que o CJ esteja segurando um controle...
Pessoas peço que caso forem compartilhar o mod utilizem esse mesmo link pois dessa forma vocês estão me ajudando, dando um certo incentivo para novas criações.
Download:
http://encurta.net/AbB4A
DronesRC Mod
Enviado: 20 Mai 2018, 18:13
por Junior_Djjr
Nice, demorou pra alguém criar algo assim.
DronesRC Mod
Enviado: 20 Mai 2018, 23:59
por Stealth760
Refiz o Script pq achei a ideia maneira e ele tinha uns errinhos, libere o source code da proxima vez, custa nada :)
Código: Selecionar tudo
SCRIPT_START
{
LVAR_INT scplayer my_car
LVAR_FLOAT x y z ang fProgress
GET_PLAYER_CHAR 0 scplayer
//////////////////////////////////////////////////
WHILE IS_PC_VERSION
WAIT 0
IF IS_CHAR_ON_FOOT scplayer
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_1
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 441
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_2
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 465
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_3
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 501
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_4
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 564
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_5
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 464
GOSUB common2
ENDIF
ENDIF
ENDWHILE
//////////////////////////////////////////////
common1:
GOSUB load
TASK_PLAY_ANIM_NON_INTERRUPTABLE scplayer "BOM_PLANT" "BOMBER" 4.0 FALSE FALSE FALSE FALSE -1
WAIT 0
WHILE IS_CHAR_PLAYING_ANIM scplayer "BOM_PLANT"
WAIT 0
GET_CHAR_ANIM_CURRENT_TIME scplayer "BOM_PLANT" fProgress
IF fProgress > 0.9
BREAK
ENDIF
ENDWHILE
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS scplayer 0.0 1.5 0.0 x y z
GET_CHAR_HEADING scplayer ang
RETURN
common2:
TASK_PLAY_ANIM_NON_INTERRUPTABLE scplayer "CAMSTND_IDLELOOP" "CAMERA" 4.0 TRUE FALSE FALSE FALSE -1
GET_REMOTE_CONTROLLED_CAR 0 my_car
WHILE IS_PLAYER_IN_REMOTE_MODE 0
WAIT 0
IF IS_KEY_PRESSED VK_KEY_K
OR IS_CHAR_DEAD scplayer
OR NOT IS_CAR_HEALTH_GREATER my_car 0
REMOVE_RC_BUGGY
BREAK
ENDIF
ENDWHILE
CLEAR_CHAR_TASKS_IMMEDIATELY scplayer
GOSUB unload
RETURN
load:
REQUEST_MODEL 441
REQUEST_MODEL 465
REQUEST_MODEL 501
REQUEST_MODEL 564
REQUEST_MODEL 464
REQUEST_ANIMATION "CAMERA"
REQUEST_ANIMATION "BOMBER"
LOAD_ALL_MODELS_NOW
RETURN
unload:
MARK_MODEL_AS_NO_LONGER_NEEDED 441
MARK_MODEL_AS_NO_LONGER_NEEDED 465
MARK_MODEL_AS_NO_LONGER_NEEDED 501
MARK_MODEL_AS_NO_LONGER_NEEDED 564
MARK_MODEL_AS_NO_LONGER_NEEDED 464
REMOVE_ANIMATION "CAMERA"
REMOVE_ANIMATION "BOMBER"
RETURN
}
SCRIPT_END
DronesRC Mod
Enviado: 21 Mai 2018, 02:58
por Junior_Djjr
↑ parece nice esse.
DronesRC Mod
Enviado: 21 Mai 2018, 10:35
por CarlosJSantos
DronesRC Mod
Enviado: 21 Mai 2018, 11:34
por Israel
fbreak-continue
Stealth760 escreveu: ↑Código: Selecionar tudo
WHILE IS_PC_VERSION
WAIT 0
IF IS_CHAR_ON_FOOT scplayer
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_1
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 441
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_2
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 465
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_3
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 501
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_4
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 564
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_5
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 464
GOSUB common2
ENDIF
ENDIF
ENDWHILE
Essa parte dava pra usar repeat, assim:
Código: Selecionar tudo
models[0] = 441
models[1] = 465
models[2] = 501
models[3] = 564
models[4] = 464
WHILE IS_PC_VERSION
WAIT 0
IF IS_CHAR_ON_FOOT scplayer
AND IS_KEY_PRESSED VK_KEY_R
REPEAT 5 n
vkey = n + 0x31 // VK_KEY_1 ~ 5
IF IS_KEY_PRESSED vkey
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang models[n]
WAIT 2000
GOSUB common2
ENDIF
ENDREPEAT
ENDIF
ENDWHILE
DronesRC Mod
Enviado: 21 Mai 2018, 14:33
por xXBrunoXx
Stealth760 escreveu: ↑Refiz o Script pq achei a ideia maneira e ele tinha uns errinhos, libere o source code da proxima vez, custa nada :)
Código: Selecionar tudo
SCRIPT_START
{
LVAR_INT scplayer my_car
LVAR_FLOAT x y z ang fProgress
GET_PLAYER_CHAR 0 scplayer
//////////////////////////////////////////////////
WHILE IS_PC_VERSION
WAIT 0
IF IS_CHAR_ON_FOOT scplayer
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_1
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 441
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_2
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 465
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_3
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 501
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_4
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 564
GOSUB common2
ENDIF
IF IS_KEY_PRESSED VK_KEY_R
AND IS_KEY_PRESSED VK_KEY_5
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang 464
GOSUB common2
ENDIF
ENDIF
ENDWHILE
//////////////////////////////////////////////
common1:
GOSUB load
TASK_PLAY_ANIM_NON_INTERRUPTABLE scplayer "BOM_PLANT" "BOMBER" 4.0 FALSE FALSE FALSE FALSE -1
WAIT 0
WHILE IS_CHAR_PLAYING_ANIM scplayer "BOM_PLANT"
WAIT 0
GET_CHAR_ANIM_CURRENT_TIME scplayer "BOM_PLANT" fProgress
IF fProgress > 0.9
BREAK
ENDIF
ENDWHILE
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS scplayer 0.0 1.5 0.0 x y z
GET_CHAR_HEADING scplayer ang
RETURN
common2:
TASK_PLAY_ANIM_NON_INTERRUPTABLE scplayer "CAMSTND_IDLELOOP" "CAMERA" 4.0 TRUE FALSE FALSE FALSE -1
GET_REMOTE_CONTROLLED_CAR 0 my_car
WHILE IS_PLAYER_IN_REMOTE_MODE 0
WAIT 0
IF IS_KEY_PRESSED VK_KEY_K
OR IS_CHAR_DEAD scplayer
OR NOT IS_CAR_HEALTH_GREATER my_car 0
REMOVE_RC_BUGGY
BREAK
ENDIF
ENDWHILE
CLEAR_CHAR_TASKS_IMMEDIATELY scplayer
GOSUB unload
RETURN
load:
REQUEST_MODEL 441
REQUEST_MODEL 465
REQUEST_MODEL 501
REQUEST_MODEL 564
REQUEST_MODEL 464
REQUEST_ANIMATION "CAMERA"
REQUEST_ANIMATION "BOMBER"
LOAD_ALL_MODELS_NOW
RETURN
unload:
MARK_MODEL_AS_NO_LONGER_NEEDED 441
MARK_MODEL_AS_NO_LONGER_NEEDED 465
MARK_MODEL_AS_NO_LONGER_NEEDED 501
MARK_MODEL_AS_NO_LONGER_NEEDED 564
MARK_MODEL_AS_NO_LONGER_NEEDED 464
REMOVE_ANIMATION "CAMERA"
REMOVE_ANIMATION "BOMBER"
RETURN
}
SCRIPT_END
Vlw ai pela atenção... Tá ai o source:
Código: Selecionar tudo
SCRIPT_START
{
NOP
LVAR_INT scplayer
GET_PLAYER_CHAR 0 scplayer
LVAR_INT message
message = false
LVAR_FLOAT x y z angle
x = 0.0
y = 0.0
z = 0.0
angle = 0.0
LVAR_INT mostrar
mostrar = off
LVAR_INT int
int = 1
REQUEST_MODEL RCCAM
REQUEST_MODEL RCBANDIT
REQUEST_MODEL RCRAIDER
REQUEST_MODEL RCGOBLIN
REQUEST_MODEL RCTIGER
REQUEST_MODEL RCBARON
REQUEST_ANIMATION CAMERA
REQUEST_ANIMATION BOMBER
LOAD_ALL_MODELS_NOW
main_loop:
WAIT 4000
IF message = false
WAIT 0
PRINT_HELP_STRING "MOD DRONES ~R~INSTALADO ~W~Criado Por ~y~xXBrunoXx"
WAIT 0
message = true
ENDIF
rc:
WAIT 0
IF message = true
GET_CHAR_HEADING scplayer angle
ENDIF
IF message = true
IF TEST_CHEAT R1
SET_CAMERA_IN_FRONT_OF_CHAR scplayer
WAIT 0
GET_ACTIVE_CAMERA_COORDINATES x y z
TASK_PLAY_ANIM scplayer BOM_Plant BOMBER 4.0 0 0 0 0 -1
WAIT 0
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z angle RCBANDIT
WAIT 500
TASK_PLAY_ANIM scplayer camstnd_idleloop CAMERA 4.0 1 0 0 0 -1
ENDIF
ENDIF
IF message = true
IF TEST_CHEAT R2
SET_CAMERA_IN_FRONT_OF_CHAR scplayer
WAIT 0
GET_ACTIVE_CAMERA_COORDINATES x y z
TASK_PLAY_ANIM scplayer BOM_Plant BOMBER 4.0 0 0 0 0 -1
WAIT 0
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z angle RCGOBLIN
WAIT 500
TASK_PLAY_ANIM scplayer camstnd_idleloop CAMERA 4.0 1 0 0 0 -1
ENDIF
ENDIF
IF message = true
IF TEST_CHEAT R3
SET_CAMERA_IN_FRONT_OF_CHAR scplayer
WAIT 0
GET_ACTIVE_CAMERA_COORDINATES x y z
TASK_PLAY_ANIM scplayer BOM_Plant BOMBER 4.0 0 0 0 0 -1
WAIT 0
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z angle RCRAIDER
WAIT 500
TASK_PLAY_ANIM scplayer camstnd_idleloop CAMERA 4.0 1 0 0 0 -1
ENDIF
ENDIF
IF message = true
IF TEST_CHEAT R4
SET_CAMERA_IN_FRONT_OF_CHAR scplayer
WAIT 0
GET_ACTIVE_CAMERA_COORDINATES x y z
TASK_PLAY_ANIM scplayer BOM_Plant BOMBER 4.0 0 0 0 0 -1
WAIT 0
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z angle RCBARON
WAIT 500
TASK_PLAY_ANIM scplayer camstnd_idleloop CAMERA 4.0 1 0 0 0 -1
ENDIF
ENDIF
IF message = true
IF TEST_CHEAT R5
SET_CAMERA_IN_FRONT_OF_CHAR scplayer
WAIT 0
GET_ACTIVE_CAMERA_COORDINATES x y z
TASK_PLAY_ANIM scplayer BOM_Plant BOMBER 4.0 0 0 0 0 -1
WAIT 0
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z angle RCTIGER
WAIT 500
TASK_PLAY_ANIM scplayer camstnd_idleloop CAMERA 4.0 1 0 0 0 -1
ENDIF
ENDIF
// REMOVER OS DRONES
IF IS_PLAYER_IN_REMOTE_MODE 0
AND IS_KEY_PRESSED VK_KEY_0
REMOVE_RC_BUGGY
WAIT 2000
CLEAR_CHAR_TASKS_IMMEDIATELY scplayer
ENDIF
IF IS_PLAYER_IN_REMOTE_MODE 0
AND IS_KEY_PRESSED VK_LCONTROL
WAIT 2000
CLEAR_CHAR_TASKS_IMMEDIATELY scplayer
ENDIF
IF IS_PLAYER_IN_REMOTE_MODE 0
AND IS_KEY_PRESSED VK_LBUTTON
WAIT 2000
CLEAR_CHAR_TASKS_IMMEDIATELY scplayer
ENDIF
GOTO rc
}
SCRIPT_END
Só não entendi qual foi o erro...
ignore a ausência dos espaços tabelados
DronesRC Mod
Enviado: 21 Mai 2018, 15:09
por Stealth760
setar variáveis pra 0 sendo que elas ja sao 0, WAIT's desnecessarios, uma mensagem na tela no inicio que sinceramente eu desinstalava o mod só por isso, muitas repetiçoes da mesma coisa sem usar gosubs, carregar os arquivos e nao descarregar mais, como eu disse sao errinhos...
Israel escreveu: ↑Essa parte dava pra usar repeat, assim:
Código: Selecionar tudo
models[0] = 441
models[1] = 465
models[2] = 501
models[3] = 564
models[4] = 464
WHILE IS_PC_VERSION
WAIT 0
IF IS_CHAR_ON_FOOT scplayer
AND IS_KEY_PRESSED VK_KEY_R
REPEAT 5 n
vkey = n + 0x31 // VK_KEY_1 ~ 5
IF IS_KEY_PRESSED vkey
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang models[n]
WAIT 2000
GOSUB common2
ENDIF
ENDREPEAT
ENDIF
ENDWHILE
Wow muito bom esse método, economiza varias linhas, thanks
Seria bom o Djjr colocar isso no tutorial de gta3script
DronesRC Mod
Enviado: 21 Mai 2018, 16:11
por xXBrunoXx
Stealth760 escreveu: ↑setar variáveis pra 0 sendo que elas ja sao 0, WAIT's desnecessarios, uma mensagem na tela no inicio que sinceramente eu desinstalava o mod só por isso, muitas repetiçoes da mesma coisa sem usar gosubs, carregar os arquivos e nao descarregar mais, como eu disse sao errinhos...
Vish mano mals, agr entendi quais foram os erros... tipo, faz pouco tempo que eu acompanho os tutoriais do Junior, e eu ainda to meio iniciante nesse negoço de escrever códigos, boa parte dos mods que criei são meio inuteis (como eu disse no incio do post) e esse foi o que mais se "destacou" e resolvi postar. vlw mesmo assim.
DronesRC Mod
Enviado: 21 Mai 2018, 16:35
por Stealth760
Sempre evoluindo, aqui esta o meu script mais a dica do Israel, ficou muito bom, só que pra compilar vc precisa do "fbreak-continue" na sua config do VSC
Código: Selecionar tudo
SCRIPT_START
{
LVAR_INT scplayer my_car
LVAR_INT models[5] n vkey
LVAR_FLOAT x y z ang fProgress
models[0] = 441
models[1] = 465
models[2] = 501
models[3] = 564
models[4] = 464
GET_PLAYER_CHAR 0 scplayer
//////////////////////////////////////////////
WHILE IS_PC_VERSION
WAIT 0
IF IS_CHAR_ON_FOOT scplayer
AND IS_KEY_PRESSED VK_KEY_R
REPEAT 5 n
vkey = n + 0x31 // VK_KEY_1 ~ 5
IF IS_KEY_PRESSED vkey
GOSUB common1
GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER 0 x y z ang models[n]
GOSUB common2
ENDIF
ENDREPEAT
ENDIF
ENDWHILE
//////////////////////////////////////////////
common1:
GOSUB load
TASK_PLAY_ANIM_NON_INTERRUPTABLE scplayer "BOM_PLANT" "BOMBER" 4.0 FALSE FALSE FALSE FALSE -1
WAIT 0
WHILE IS_CHAR_PLAYING_ANIM scplayer "BOM_PLANT"
WAIT 0
GET_CHAR_ANIM_CURRENT_TIME scplayer "BOM_PLANT" fProgress
IF fProgress > 0.9
BREAK
ENDIF
ENDWHILE
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS scplayer 0.0 1.5 0.0 x y z
GET_CHAR_HEADING scplayer ang
RETURN
common2:
TASK_PLAY_ANIM_NON_INTERRUPTABLE scplayer "CAMSTND_IDLELOOP" "CAMERA" 4.0 TRUE FALSE FALSE FALSE -1
GET_REMOTE_CONTROLLED_CAR 0 my_car
WHILE IS_PLAYER_IN_REMOTE_MODE 0
WAIT 0
IF IS_KEY_PRESSED VK_KEY_K
OR IS_CHAR_DEAD scplayer
OR NOT IS_CAR_HEALTH_GREATER my_car 0
REMOVE_RC_BUGGY
BREAK
ENDIF
ENDWHILE
CLEAR_CHAR_TASKS_IMMEDIATELY scplayer
GOSUB unload
RETURN
load:
REQUEST_MODEL 441
REQUEST_MODEL 465
REQUEST_MODEL 501
REQUEST_MODEL 564
REQUEST_MODEL 464
REQUEST_ANIMATION "CAMERA"
REQUEST_ANIMATION "BOMBER"
LOAD_ALL_MODELS_NOW
RETURN
unload:
MARK_MODEL_AS_NO_LONGER_NEEDED 441
MARK_MODEL_AS_NO_LONGER_NEEDED 465
MARK_MODEL_AS_NO_LONGER_NEEDED 501
MARK_MODEL_AS_NO_LONGER_NEEDED 564
MARK_MODEL_AS_NO_LONGER_NEEDED 464
REMOVE_ANIMATION "CAMERA"
REMOVE_ANIMATION "BOMBER"
RETURN
}
SCRIPT_END