Me ajudem com esse cmd!!
ele so puxa para um player, se outro player tentar puxar um carro o primeiro carro spawnado somi
CMD:car(playerid, params[])
{
new String[200], Cor1, Cor2, FloatosX,FloatosY,FloatosZ, Float:Rot;
if(sscanf(params, "s[90]dd", pveh, Cor1, Cor2)) return SendClientMessage(playerid, 0xFF0000AA, "| ERRO | {FFFFFF}Tente Usar /car [Nome] [Cor 1] [Cor 2]");
if(Veh[playerid] > 0)
{
DestroyVehicle(Veh[playerid]);
Veh[playerid] = 0;
}
new vehicle = PegarNomeDoVeiculo(pveh);
if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, 0xFF0000AA, "| Erro | {FFFFFF}Veiculo Nao Encontrado !");
GetPlayerPos(playerid, PosX, PosY, PosZ);
GetPlayerFacingAngle(playerid, Rot);
Veh[playerid] = CreateVehicle(vehicle, PosX, PosY, PosZ, Rot, Cor1, Cor2, GetPlayerVirtualWorld(playerid));
SetVehicleVirtualWorld(Veh[playerid], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, Veh[playerid], 0);
format(String, sizeof(String), "{FF0000}Razer {FFFFFF}Pilots Veiculo Criado Com Sucesso! [ Veiculo: {0x80FF00AA}%s ]", NomeDosVeiculos[vehicle - 400]);
SendClientMessage(playerid, 0xFFFF80AA, String);
return 1;
}
ele so puxa para um player, se outro player tentar puxar um carro o primeiro carro spawnado somi
CMD:car(playerid, params[])
{
new String[200], Cor1, Cor2, FloatosX,FloatosY,FloatosZ, Float:Rot;
if(sscanf(params, "s[90]dd", pveh, Cor1, Cor2)) return SendClientMessage(playerid, 0xFF0000AA, "| ERRO | {FFFFFF}Tente Usar /car [Nome] [Cor 1] [Cor 2]");
if(Veh[playerid] > 0)
{
DestroyVehicle(Veh[playerid]);
Veh[playerid] = 0;
}
new vehicle = PegarNomeDoVeiculo(pveh);
if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, 0xFF0000AA, "| Erro | {FFFFFF}Veiculo Nao Encontrado !");
GetPlayerPos(playerid, PosX, PosY, PosZ);
GetPlayerFacingAngle(playerid, Rot);
Veh[playerid] = CreateVehicle(vehicle, PosX, PosY, PosZ, Rot, Cor1, Cor2, GetPlayerVirtualWorld(playerid));
SetVehicleVirtualWorld(Veh[playerid], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, Veh[playerid], 0);
format(String, sizeof(String), "{FF0000}Razer {FFFFFF}Pilots Veiculo Criado Com Sucesso! [ Veiculo: {0x80FF00AA}%s ]", NomeDosVeiculos[vehicle - 400]);
SendClientMessage(playerid, 0xFFFF80AA, String);
return 1;
}