[Pedido]cambiar color estos autos
#1

Resumen del pedido: - [Pedido]cambiar color estos autos
Explicaciуn detallada del pedido: -he credo y editado una faccion y necesito cambiar de color estos autos el color que quiero poner estodos negros todos los autos de color negro
GM Base (opcional): -[GM] OxLiner Roleplay v.1.3 Por kalex
Notas (opcional): -+1
pawn Код:
CreateVehicle(598, 1535.9969, -1678.3899, 13.2010, 359.7990, -1, -1, 100);
CreateVehicle(598, 1535.8926, -1667.4288, 13.2010, 180.5725, -1, -1, 100);
CreateVehicle(598, 1545.4886, -1606.7548, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1550.6724, -1606.6267, 12.7808, 0.3030, -1, -1, 100);
CreateVehicle(598, 1555.6721, -1606.8043, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1560.6594, -1607.1057, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1565.4916, -1606.7100, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1585.1880, -1606.5565, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1590.4968, -1606.5680, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1570.3330, -1606.5581, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1575.4153, -1606.7694, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(598, 1579.8052, -1606.6184, 12.9818, 0.3030, -1, -1, 100);
CreateVehicle(427, 1555.8722, -1617.4877, 13.4824, 270.4149, -1, -1, 100);
CreateVehicle(427, 1559.0138, -1710.4958, 5.8162, 0.0000, -1, -1, 100);
CreateVehicle(427, 1578.1565, -1709.6147, 5.8162, 0.0000, -1, -1, 100);
CreateVehicle(427, 1569.8965, -1710.5555, 5.8162, 0.0000, -1, -1, 100);
CreateVehicle(598, 1574.3286, -1709.3124, 5.4826, 0.0000, -1, -1, 100);
CreateVehicle(598, 1564.4441, -1709.8588, 5.4826, 0.0000, -1, -1, 100);
CreateVehicle(598, 1582.9343, -1708.9247, 5.4826, 0.0000, -1, -1, 100);
CreateVehicle(427, 1587.8074, -1709.7208, 5.8162, 0.0000, -1, -1, 100);
CreateVehicle(598, 1591.8131, -1710.0067, 5.6007, 0.0000, -1, -1, 100);
CreateVehicle(427, 1596.1030, -1710.4097, 5.8914, 0.0000, -1, -1, 100);
CreateVehicle(598, 1529.8230, -1688.3259, 5.5031, 270.0581, -1, -1, 100);
CreateVehicle(598, 1529.7513, -1683.8763, 5.5031, 270.0581, -1, -1, 100);
Reply
#2

Hola Lanzik
Para cambiar el color de esos autos a negro solo sustituye el -1 por el 0.
Mas informaciуn aquн: https://sampwiki.blast.hk/wiki/Vehicle_Color_IDs y
https://sampwiki.blast.hk/wiki/Function:CreateVehicle
Saludos
Reply
#3

Primero defines los vehiculos con una variable:
pawn Код:
new Vehiculos[16];

Vehiculos[0] = CreateVehicle(598, 1535.9969, -1678.3899, 13.2010, 359.7990, -1, -1, 100);
Vehiculos[1] = CreateVehicle(598, 1535.8926, -1667.4288, 13.2010, 180.5725, -1, -1, 100);
etc etc

En otro momento  o en otra funcion le pones los colores con:
new Color[2];
Color[0] = 1;
Color[1] = 2;
ChangeVehicleColor ( Vehiculos[0], Color[0], Color[1] ) ;
o Puedes usar un bucle.
for(new todos=0; todos<16; todos++)
{
    ChangeVehicleColor ( Vehiculos[todos], Color[0], Color[1] ) ;
}
//no es el sistema, pero es una idea que tengas para que tu mismo lo hagas, acostumbrate a usar la wiki samp
https://sampwiki.blast.hk/wiki/ChangeVehicleColor
Reply
#4

pawn Код:
CreateVehicle(598, 1535.9969, -1678.3899, 13.2010, 359.7990, random(200), random(200), 100);
CreateVehicle(598, 1535.8926, -1667.4288, 13.2010, 180.5725, random(200), random(200), 100);
CreateVehicle(598, 1545.4886, -1606.7548, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1550.6724, -1606.6267, 12.7808, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1555.6721, -1606.8043, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1560.6594, -1607.1057, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1565.4916, -1606.7100, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1585.1880, -1606.5565, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1590.4968, -1606.5680, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1570.3330, -1606.5581, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1575.4153, -1606.7694, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(598, 1579.8052, -1606.6184, 12.9818, 0.3030, random(200), random(200), 100);
CreateVehicle(427, 1555.8722, -1617.4877, 13.4824, 270.4149, random(200), random(200), 100);
CreateVehicle(427, 1559.0138, -1710.4958, 5.8162, 0.0000, random(200), random(200), 100);
CreateVehicle(427, 1578.1565, -1709.6147, 5.8162, 0.0000, random(200), random(200), 100);
CreateVehicle(427, 1569.8965, -1710.5555, 5.8162, 0.0000, random(200), random(200), 100);
CreateVehicle(598, 1574.3286, -1709.3124, 5.4826, 0.0000, random(200), random(200), 100);
CreateVehicle(598, 1564.4441, -1709.8588, 5.4826, 0.0000, random(200), random(200), 100);
CreateVehicle(598, 1582.9343, -1708.9247, 5.4826, 0.0000, random(200), random(200), 100);
CreateVehicle(427, 1587.8074, -1709.7208, 5.8162, 0.0000, random(200), random(200), 100);
CreateVehicle(598, 1591.8131, -1710.0067, 5.6007, 0.0000, random(200), random(200), 100);
CreateVehicle(427, 1596.1030, -1710.4097, 5.8914, 0.0000, random(200), random(200), 100);
CreateVehicle(598, 1529.8230, -1688.3259, 5.5031, 270.0581, random(200), random(200), 100);
CreateVehicle(598, 1529.7513, -1683.8763, 5.5031, 270.0581, random(200), random(200), 100);
el color sera del id 0 al 200 y sera random. (una variedad de colores como single player)

saludos.
Reply
#5

ya lo cambie y ahora me pasa esto:
lo puse y lo cambie y mira
errores
pawn Код:
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(343) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(344) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(345) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(346) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(347) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(348) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(349) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(350) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(351) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(352) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(353) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(354) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(355) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


24 Warnings.
asi como lo pase
pawn Код:
SAPDVehicles[0] = AddStaticVehicleEx(598, 1535.9969, -1678.3899, 13.2010, 359.7990, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[1] = AddStaticVehicleEx(598, 1535.8926, -1667.4288, 13.2010, 180.5725, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[2] = AddStaticVehicleEx(598, 1545.4886, -1606.7548, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[3] = AddStaticVehicleEx(598, 1550.6724, -1606.6267, 12.7808, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[4] = AddStaticVehicleEx(598, 1555.6721, -1606.8043, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[5] = AddStaticVehicleEx(598, 1529.7513, -1683.8763, 5.5031, 270.0581, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[6] = AddStaticVehicleEx(598, 1529.8230, -1688.3259, 5.5031, 270.0581, 0,0, 100,TIME_RESPAWN);
SAPDVehicles[7] = AddStaticVehicleEx(427, 1596.1030, -1710.4097, 5.8914, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[8] = AddStaticVehicleEx(598, 1560.6594, -1607.1057, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[9] = AddStaticVehicleEx(598, 1565.4916, -1606.7100, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[10] = AddStaticVehicleEx(598, 1585.1880, -1606.5565, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[11] = AddStaticVehicleEx(598, 1590.4968, -1606.5680, 12.9818, 0.3030,0, 0, 100,TIME_RESPAWN);
SAPDVehicles[12] = AddStaticVehicleEx(598, 1570.3330, -1606.5581, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[13] = AddStaticVehicleEx(598, 1575.4153, -1606.7694, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[14] = AddStaticVehicleEx(598, 1591.8131, -1710.0067, 5.6007, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[15] = AddStaticVehicleEx(427, 1587.8074, -1709.7208, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[16] = AddStaticVehicleEx(598, 1564.4441, -1709.8588, 5.4826, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[17] = AddStaticVehicleEx(427, 1569.8965, -1710.5555, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[18] = AddStaticVehicleEx(598, 1574.3286, -1709.3124, 5.4826, 0.0000, 0,0, 100,TIME_RESPAWN);
SAPDVehicles[19] = AddStaticVehicleEx(427, 1578.1565, -1709.6147, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[20] = AddStaticVehicleEx(598, 1582.9343, -1708.9247, 5.4826, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[21] = AddStaticVehicleEx(427, 1559.0138, -1710.4958, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[22] = AddStaticVehicleEx(427, 1555.8722, -1617.4877, 13.4824, 270.4149, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[23] = AddStaticVehicleEx(598, 1579.8052, -1606.6184, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
Reply
#6

Quote:
Originally Posted by Lanzik
Посмотреть сообщение
ya lo cambie y ahora me pasa esto:
lo puse y lo cambie y mira
errores
pawn Код:
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(343) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(344) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(345) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(346) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(347) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(348) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(349) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(350) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(351) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(352) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(353) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(354) : warning 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\NorthZone\gamemodes\NZRP.pwn(355) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


24 Warnings.
asi como lo pase
pawn Код:
SAPDVehicles[0] = AddStaticVehicleEx(598, 1535.9969, -1678.3899, 13.2010, 359.7990, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[1] = AddStaticVehicleEx(598, 1535.8926, -1667.4288, 13.2010, 180.5725, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[2] = AddStaticVehicleEx(598, 1545.4886, -1606.7548, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[3] = AddStaticVehicleEx(598, 1550.6724, -1606.6267, 12.7808, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[4] = AddStaticVehicleEx(598, 1555.6721, -1606.8043, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[5] = AddStaticVehicleEx(598, 1529.7513, -1683.8763, 5.5031, 270.0581, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[6] = AddStaticVehicleEx(598, 1529.8230, -1688.3259, 5.5031, 270.0581, 0,0, 100,TIME_RESPAWN);
SAPDVehicles[7] = AddStaticVehicleEx(427, 1596.1030, -1710.4097, 5.8914, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[8] = AddStaticVehicleEx(598, 1560.6594, -1607.1057, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[9] = AddStaticVehicleEx(598, 1565.4916, -1606.7100, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[10] = AddStaticVehicleEx(598, 1585.1880, -1606.5565, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[11] = AddStaticVehicleEx(598, 1590.4968, -1606.5680, 12.9818, 0.3030,0, 0, 100,TIME_RESPAWN);
SAPDVehicles[12] = AddStaticVehicleEx(598, 1570.3330, -1606.5581, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[13] = AddStaticVehicleEx(598, 1575.4153, -1606.7694, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[14] = AddStaticVehicleEx(598, 1591.8131, -1710.0067, 5.6007, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[15] = AddStaticVehicleEx(427, 1587.8074, -1709.7208, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[16] = AddStaticVehicleEx(598, 1564.4441, -1709.8588, 5.4826, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[17] = AddStaticVehicleEx(427, 1569.8965, -1710.5555, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[18] = AddStaticVehicleEx(598, 1574.3286, -1709.3124, 5.4826, 0.0000, 0,0, 100,TIME_RESPAWN);
SAPDVehicles[19] = AddStaticVehicleEx(427, 1578.1565, -1709.6147, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[20] = AddStaticVehicleEx(598, 1582.9343, -1708.9247, 5.4826, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[21] = AddStaticVehicleEx(427, 1559.0138, -1710.4958, 5.8162, 0.0000, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[22] = AddStaticVehicleEx(427, 1555.8722, -1617.4877, 13.4824, 270.4149, 0, 0, 100,TIME_RESPAWN);
SAPDVehicles[23] = AddStaticVehicleEx(598, 1579.8052, -1606.6184, 12.9818, 0.3030, 0, 0, 100,TIME_RESPAWN);
Estбs poniendo un parametro mas, son 8 y le estбs poniendo 9, Quitale el 100 que estб antes del time respawn
pawn Код:
AddStaticVehicleEx(598, 1579.8052, -1606.6184, 12.9818, 0.3030, 0, 0, TIME_RESPAWN);
Reply
#7

vale muchas gracias
Solucionado
Reply
#8

OTACON, no es necesario un random para eso, con -1 basta para lo mismo creo yo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)