[Ajuda] AttachTrailerToVehicle para fazer Bitrem...(2)
#1

Andei tentando fazer o cуdigo... Mas sem sucesso...

Este cуdigo aqui em baixo da pra fazer Um attach ao veiculo, mas eu pretendia fazer um attach ao veiculo e outro trailer e n consigo...

Код:
 new vehicleid = CreateVehicle(...);
new trailerid = CreateVehicle(...);
 
AttachTrailerToVehicle(trailerid, vehicleid);
#edit
Fui dar uma de perito kkkkk e fiz isto...
Код:
CMD:train(playerid,params[])
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    new roadtraintruck = CreateVehicle(515, X, Y, Z, 0, 0, 1); // Make sure you set the colors.
    PutPlayerInVehicle(playerid, roadtraintruck, 0);
    new roadtraintrailer = CreateVehicle(591, X, Y, Z, 0, 0, 1); // Colors here too.
    AttachTrailerToVehicle(roadtraintrailer, roadtraintruck);
    new roadtraintrailer2 = CreateVehicle(435, X, Y, Z, 0, 0, 1 ); // Colors here too.
    AttachTrailerToVehicle(roadtraintrailer2, roadtraintrailer);
    
    return 1;
}
Acabou dando estes erros...
Код:
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4902) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4902) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4902) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4903) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4904) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4904) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4904) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4904) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4906) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4906) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4906) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4906) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4908) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4908) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4908) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4908) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4902) : warning 203: symbol is never used: "Z"
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4902) : warning 203: symbol is never used: "Y"
C:\Documents and Settings\Administrador\Ambiente de trabalho\GM SHOW\gamemodes\truck.pwn(4902) : warning 203: symbol is never used: "X"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
HELP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)