[Pedido] Comando criar carro complexo .
#1

Entгo galera, to a muito tempo tentando criar um comando , cerca de 1hr .

й o seguinte :

o player digitaria /v Nome do carro , [ Nome da primeira cor ] , [ nome da segunda cor ]

O comando seria em ZCMD , usando os parвmetros sscanf

eu ja fiz um comando , porйm , ele sу funciona com o ID do carro , e o ID das cores .

Exemplo :

/v 560 2 6

entende ?


Se alguйm poder me ajudar, ou mandar um comando desses jб pronto , vai me ajudar muito .

queria algo como :

/v nrg preta vermelha

ou

/v sultan amarelo branco



Й isso :\
Reply
#2

pawn Код:
CMD:v(playerid,params[])
{
new idcar,cor1,cor2,Float:c[3],Float:a;
if(!IsPlayerAdmin(playerid)) return SendClientMessage (playerid,0xFF0000AA,"Comando apenas para administrador rcon");
if(sscanf(params,"ddd",idcar,cor1,cor2)) return SendClientMessage(playerid,0xFF0000AA,"/v [idcarro] [cor1] [cor2]");
GetPlayerPos(playerid,c[0],c[1],c[2]);
GetPlayerFacingAngle(playerid,a);
carro = CreateVehicle(carro,c[0],c[1],c[2],a,cor1,cor2,6000);
PutPlayerInVehicle(playerid,carro,0);
return true;
}
Reply
#3

Quote:
Originally Posted by vitorvlv
Посмотреть сообщение
pawn Код:
CMD:v(playerid,params[])
{
new idcar,cor1,cor2,Float:c[3],Float:a;
if(!IsPlayerAdmin(playerid)) return SendClientMessage (playerid,0xFF0000AA,"Comando apenas para administrador rcon");
if(sscanf(params,"ddd",carro)) return SendClientMessage(playerid,0xFF0000AA,"/v [idcarro] [cor1] [cor2]");
GetPlayerPos(playerid,c[0],c[1],c[2]);
GetPlayerFacingAngle(playerid,a);
carro = CreateVehicle(carro,c[0],c[1],c[2],a,cor1,cor2,6000);
PutPlayerInVehicle(playerid,carro,0);
return true;
}
Olб vitorvlv!

Vocк leu o tуpico

Vlw!
Reply
#4

Quote:
Originally Posted by NuTShoT
Посмотреть сообщение
Olб vitorvlv!

Vocк leu o tуpico

Vlw!
esse exemplo que ele deu no tуpico
Quote:

Exemplo :

/v 560 2 6

entende ?

й a mesma coisa do meu cуdigo...
Reply
#5

Queria um tipo assim ,

/Nome do carro [Nome da Cor] [Nome da Cor2]

Nгo consigo fazer , affz


por favor , alguйm posta ai !
nгo й preguiзa
Reply
#6

Quote:
Originally Posted by Duun
Посмотреть сообщение
Queria um tipo assim ,

/Nome do carro [Nome da Cor] [Nome da Cor2]

Nгo consigo fazer , affz


por favor , alguйm posta ai !
nгo й preguiзa
https://sampforum.blast.hk/showthread.php?tid=346727
Reply
#7

Muito obrigado veeeeeeeeeeei
Reply
#8

й so getar no comando:

pawn Код:
new VehicleNames[212][] = {
{"Landstalker"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"},{"Dumper"},
{"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},
{"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},{"Washington"},
{"Bobcat"},{"Mr Whoopee"},{"BF Injection"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},
{"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Trailer 1"},{"Previon"},
{"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},
{"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Trailer 2"},{"Turismo"},
{"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC Van"},
{"Skimmer"},{"PCJ-600"},{"Faggio"},{"Freeway"},{"RC Baron"},{"RC Raider"},{"Glendale"},{"Oceanic"},
{"Sanchez"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},
{"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},
{"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"Rancher"},{"FBI Rancher"},{"Virgo"},{"Greenwood"},
{"Jetmax"},{"Hotring"},{"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},
{"Mesa"},{"RC Goblin"},{"Hotring Racer A"},{"Hotring Racer B"},{"Bloodring Banger"},{"Rancher"},
{"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stunt"},
{"Tanker"}, {"Roadtrain"},{"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},
{"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},
{"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},
{"Blade"},{"Freight"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},
{"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},
{"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},
{"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},{"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},
{"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Duneride"},{"Sweeper"},
{"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},
{"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},
{"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},
{"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},
{"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},
{"Utility Trailer"}};
Reply
#9

Como assim Murilo ?

meu comando й assim cara :


pawn Код:
CMD:v(playerid, params[])
{
    new Modelo;   new Cor[2];   new Car;
    new Float:x, Float:y, Float:z;
    if(sscanf(params, "ia<i>[2]", Modelo, Cor)) return SendClientMessage(playerid, -1, "/V [ID] [Cor 1] [Cor 2]");
    GetPlayerPos(playerid, x, y, z);
    Car = CreateVehicle(Modelo, x,y,z,0, Cor[0], Cor[1], false);
    PutPlayerInVehicle(playerid, Car, 0);
    return true;

e quanto os nomes das cores ?

Ex :

/v Sultan Amarelo Verde
Reply
#10

Й sу vocк fazer uma matriz como database de cores uй. Nгo tem nada de complexo nesse comando
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)